/* ==========================================================================
   DENO DEVVING — SOLANA SIGNAL DESK
   UI/UX Design System with Customizable Themes & Layout System
   Palettes: Emerald (Default), Forest, Ocean, Violet
   ========================================================================== */

:root {
  color-scheme: dark;

  /* Default Palette: Emerald */
  --bg: #080b0a;
  --bg-gradient: radial-gradient(ellipse 70% 40% at 50% -15%, rgba(36, 201, 138, 0.08), transparent 70%), #080b0a;
  --surface: #101613;
  --surface-2: #151d19;
  --surface-3: #1a2520;
  --surface-elevated: #1f2d27;
  --surface-subtle: rgba(21, 29, 25, 0.65);

  --line: rgba(73, 102, 86, 0.18);
  --line-strong: rgba(73, 102, 86, 0.34);
  --line-subtle: rgba(255, 255, 255, 0.04);
  --line-focus: rgba(36, 201, 138, 0.55);

  --text: #edf5f0;
  --muted: #91a198;
  --quiet: #5f7267;

  --accent: #24c98a;
  --accent-hover: #2ad795;
  --accent-dark: #1a9666;
  --accent-subtle: rgba(36, 201, 138, 0.12);
  --accent-glow: rgba(36, 201, 138, 0.22);

  /* Legacy aliases for existing JS hooks */
  --emerald: var(--accent);
  --emerald-hover: var(--accent-hover);
  --emerald-dark: var(--accent-dark);
  --emerald-subtle: var(--accent-subtle);
  --emerald-glow: var(--accent-glow);
  --mint: var(--accent-hover);
  --cyan: var(--accent);
  --blue: var(--accent-dark);

  --yellow: #e6b142;
  --amber: #e6b142;
  --red: #eb5757;
  --red-subtle: rgba(235, 87, 87, 0.12);

  --radius-sm: 6px;
  --radius-md: 9px;
  --radius-lg: 12px;
  --radius-xl: 16px;

  --shadow-subtle: 0 1px 2px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--line);
  --shadow-elevated: 0 14px 40px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line);
  --shadow-glow: 0 0 20px -3px var(--accent-glow);

  --mono: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --display: "Space Grotesk", "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ==========================================================================
   PALETTE OVERRIDES: Forest, Ocean, Violet
   ========================================================================== */

/* Forest: Deep alpine pine & spruce */
:root[data-palette="forest"] {
  --bg: #070e0a;
  --bg-gradient: radial-gradient(ellipse 70% 40% at 50% -15%, rgba(43, 182, 115, 0.09), transparent 70%), #070e0a;
  --surface: #0e1912;
  --surface-2: #14221a;
  --surface-3: #1b2c22;
  --surface-elevated: #22372b;
  --surface-subtle: rgba(20, 34, 26, 0.65);
  --line: rgba(65, 110, 85, 0.22);
  --line-strong: rgba(65, 110, 85, 0.38);
  --line-focus: rgba(43, 182, 115, 0.55);
  --text: #eff7f2;
  --muted: #8ea698;
  --quiet: #597364;
  --accent: #2bb673;
  --accent-hover: #32cf84;
  --accent-dark: #1b8a53;
  --accent-subtle: rgba(43, 182, 115, 0.12);
  --accent-glow: rgba(43, 182, 115, 0.22);
}

/* Ocean: Electric cyan & deep teal abyssal obsidian */
:root[data-palette="ocean"] {
  --bg: #070a0e;
  --bg-gradient: radial-gradient(ellipse 70% 40% at 50% -15%, rgba(20, 241, 217, 0.08), transparent 70%), #070a0e;
  --surface: #0c1219;
  --surface-2: #111a24;
  --surface-3: #172431;
  --surface-elevated: #1e2e3e;
  --surface-subtle: rgba(17, 26, 36, 0.65);
  --line: rgba(56, 98, 126, 0.22);
  --line-strong: rgba(56, 98, 126, 0.38);
  --line-focus: rgba(20, 241, 217, 0.55);
  --text: #eaf5fc;
  --muted: #8ba2b4;
  --quiet: #556f82;
  --accent: #14f1d9;
  --accent-hover: #3df5e1;
  --accent-dark: #0eb3a1;
  --accent-subtle: rgba(20, 241, 217, 0.12);
  --accent-glow: rgba(20, 241, 217, 0.22);
}

/* Violet: Cybernetic orchid & deep amethyst */
:root[data-palette="violet"] {
  --bg: #0a070f;
  --bg-gradient: radial-gradient(ellipse 70% 40% at 50% -15%, rgba(168, 85, 247, 0.09), transparent 70%), #0a070f;
  --surface: #120e1a;
  --surface-2: #181323;
  --surface-3: #211a30;
  --surface-elevated: #2a213e;
  --surface-subtle: rgba(24, 19, 35, 0.65);
  --line: rgba(105, 73, 140, 0.24);
  --line-strong: rgba(105, 73, 140, 0.4);
  --line-focus: rgba(168, 85, 247, 0.55);
  --text: #f5f0fc;
  --muted: #9f91b4;
  --quiet: #6b5c82;
  --accent: #a855f7;
  --accent-hover: #b86ef9;
  --accent-dark: #7e22ce;
  --accent-subtle: rgba(168, 85, 247, 0.14);
  --accent-glow: rgba(168, 85, 247, 0.25);
}

/* ==========================================================================
   LIGHT THEME (Coherent with brand)
   ========================================================================== */
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f4f8f5;
  --bg-gradient: radial-gradient(ellipse 70% 35% at 50% -12%, rgba(31, 163, 112, 0.08), transparent 70%), #f4f8f5;
  --surface: #ffffff;
  --surface-2: #edf4ef;
  --surface-3: #e2ece5;
  --surface-elevated: #ffffff;
  --surface-subtle: rgba(237, 244, 239, 0.8);

  --line: rgba(53, 84, 69, 0.14);
  --line-strong: rgba(53, 84, 69, 0.26);
  --line-subtle: rgba(53, 84, 69, 0.06);
  --line-focus: rgba(31, 163, 112, 0.55);

  --text: #111c16;
  --muted: #536b5e;
  --quiet: #789083;

  --accent: #1fa370;
  --accent-hover: #188a5d;
  --accent-dark: #126847;
  --accent-subtle: rgba(31, 163, 112, 0.1);
  --accent-glow: rgba(31, 163, 112, 0.18);

  --yellow: #c88d18;
  --amber: #c88d18;
  --red: #d94242;
  --red-subtle: rgba(217, 66, 66, 0.09);

  --shadow-subtle: 0 1px 3px rgba(18, 28, 22, 0.06), 0 0 0 1px var(--line);
  --shadow-elevated: 0 14px 38px -10px rgba(18, 28, 22, 0.12), 0 0 0 1px var(--line);
  --shadow-glow: 0 0 20px -3px var(--accent-glow);
}

:root[data-theme="light"][data-palette="forest"] {
  --accent: #239960;
  --accent-hover: #1b7a4d;
  --accent-dark: #135c39;
  --accent-subtle: rgba(35, 153, 96, 0.1);
  --accent-glow: rgba(35, 153, 96, 0.18);
}

:root[data-theme="light"][data-palette="ocean"] {
  --bg: #f3f7fa;
  --surface-2: #e8f0f6;
  --surface-3: #dce7f0;
  --accent: #02998a;
  --accent-hover: #028074;
  --accent-dark: #016259;
  --accent-subtle: rgba(2, 153, 138, 0.1);
  --accent-glow: rgba(2, 153, 138, 0.18);
}

:root[data-theme="light"][data-palette="violet"] {
  --bg: #f7f4fa;
  --surface-2: #f0eaf5;
  --surface-3: #e6ddec;
  --accent: #8b37e8;
  --accent-hover: #732ac7;
  --accent-dark: #571ba0;
  --accent-subtle: rgba(139, 55, 232, 0.1);
  --accent-glow: rgba(139, 55, 232, 0.18);
}

/* ==========================================================================
   BASE & TYPOGRAPHY
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  overflow: hidden;
  background: var(--bg-gradient);
  background-color: var(--bg);
  color: var(--text);
  font: 13px/1.5 var(--body);
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

button:focus-visible, input:focus-visible, textarea:focus-visible, a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.hidden, [hidden] {
  display: none !important;
}

/* Clean unified SVG icons */
.app-svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  stroke-width: 2;
  stroke: currentColor;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  display: inline-block;
  vertical-align: middle;
}

.app-svg.fill-current {
  fill: currentColor;
  stroke: none;
}

/* ==========================================================================
   TOPBAR
   ========================================================================== */
.topbar {
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 18px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: relative;
  z-index: 50;
  backdrop-filter: blur(12px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  flex-shrink: 0;
  transition: opacity 0.15s ease;
}

.brand-lockup:hover {
  opacity: 0.9;
}

.brand-mark {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--accent-subtle), transparent);
  box-shadow: inset 0 0 14px var(--accent-subtle), 0 0 14px var(--accent-subtle);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-mark svg path:first-child {
  fill: var(--accent);
}

.brand-mark svg path:last-child {
  fill: #ffffff;
}

.brand-name {
  display: flex;
  align-items: baseline;
  gap: 5px;
  font: 700 13px/1 var(--display);
  letter-spacing: 0.03em;
}

.brand-name strong {
  color: var(--text);
}

.brand-name span {
  color: var(--accent);
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 600;
}

.workspace-switch {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.15s ease;
}

.workspace-switch:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--surface-3);
}

.workspace-switch-icon {
  color: var(--accent);
  font-size: 13px;
}

.chevron {
  color: var(--quiet);
  font-size: 10px;
}

.top-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: min(320px, 26vw);
  height: 34px;
  margin-left: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  transition: all 0.15s ease;
}

.top-search:focus-within {
  border-color: var(--line-focus);
  background: var(--surface-3);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.search-icon {
  display: inline-grid;
  place-items: center;
  color: var(--quiet);
}

.top-search input {
  flex: 1;
  width: 100%;
  border: 0;
  outline: 0;
  color: var(--text);
  background: transparent;
  font-size: 12px;
}

.top-search input::placeholder {
  color: var(--quiet);
}

.top-search kbd {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--quiet);
  font: 9px/1 var(--mono);
  background: var(--surface);
}

.topbar-spacer {
  flex: 1;
}

/* Top quick actions group */
.top-actions {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--surface-2);
}

.top-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  background: transparent;
  border: 0;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font: 600 11px/1 var(--display);
  letter-spacing: 0.04em;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.top-action:last-child {
  border-right: 0;
}

.top-action:hover {
  background: var(--surface-3);
  color: var(--text);
}

.top-action-create {
  color: var(--text);
  background: var(--accent-subtle);
  border-color: var(--accent-subtle);
}

.top-action-create:hover {
  background: var(--accent);
  color: #05140d;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.theme-toggle:hover {
  border-color: var(--line-strong);
  color: var(--text);
  background: var(--surface-3);
}

.theme-toggle-icon {
  display: inline-grid;
  place-items: center;
  color: var(--accent);
}

.account-root {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}

.account-loading {
  color: var(--quiet);
  font-size: 11px;
  font-family: var(--mono);
}

.wallet-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  color: var(--text);
  font: 11px var(--mono);
  transition: all 0.15s ease;
}

.wallet-chip:hover {
  border-color: var(--accent);
}

.wallet-chip-icon {
  color: var(--accent);
  font-size: 12px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.button:hover:not(:disabled) {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

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

.button-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #05140d;
  font-weight: 700;
  box-shadow: 0 2px 12px var(--accent-glow);
}

.button-secondary {
  background: var(--surface-2);
  border-color: var(--line-strong);
  color: var(--text);
}

.button-secondary:hover:not(:disabled) {
  background: var(--surface-3);
  border-color: var(--accent);
}

.button-quiet {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 500;
}

.button-quiet:hover:not(:disabled) {
  border-color: var(--line-strong);
  color: var(--text);
}

.icon-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 15px;
  transition: all 0.15s ease;
}

.icon-button:hover {
  color: var(--text);
  border-color: var(--line-strong);
  background: var(--surface-3);
}

.icon-button.subtle {
  border-color: transparent;
  background: transparent;
}

.icon-button.subtle:hover {
  background: var(--surface-2);
}

/* ==========================================================================
   WORKSPACE 3-COLUMN LAYOUT & DRAGGABLE CUSTOMIZATION
   ========================================================================== */
.workspace-layout {
  display: grid;
  grid-template-columns: 220px minmax(380px, 1fr) 270px 310px;
  gap: 10px;
  height: calc(100dvh - 96px);
  padding: 10px 14px 8px;
  overflow: hidden;
  transition: all 0.25s ease;
  perspective: 1200px;
}

.workspace-panel {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-subtle);
  transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.22s ease,
              opacity 0.25s ease,
              background 0.22s ease;
  position: relative;
  will-change: transform, box-shadow;
  transform: translateZ(0);
}

/* 3D Hover & Focus on Active Workspace Panel */
.workspace-panel:hover,
.workspace-panel:focus-within {
  transform: translateY(-2px) translateZ(8px);
  border-color: var(--line-focus);
  box-shadow: 0 18px 40px -10px rgba(0, 0, 0, 0.6),
              0 6px 16px -4px rgba(0, 0, 0, 0.35),
              inset 0 1px 0 rgba(255, 255, 255, 0.05),
              0 0 0 1px var(--line-focus),
              0 0 22px -3px var(--accent-glow);
  z-index: 5;
}

/* Depth-of-field dimming on inactive panels when user is focused on one */
.workspace-layout:hover .workspace-panel:not(:hover):not(:focus-within) {
  opacity: 0.88;
}

/* Panel Drag & Drop affordance */
.panel-drag-handle {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 4px;
  color: var(--quiet);
  cursor: grab;
  transition: all 0.12s ease;
  user-select: none;
}

.panel-drag-handle:hover {
  color: var(--accent);
  background: var(--surface-2);
}

.panel-drag-handle:active {
  cursor: grabbing;
}

.workspace-panel.dragging {
  opacity: 0.45;
  transform: scale(0.985);
  border-style: dashed;
  border-color: var(--accent);
}

.workspace-panel.drag-over {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-subtle);
}

.workspace-panel.panel-hidden {
  display: none !important;
}

/* ==========================================================================
   LEFT SIDEBAR
   ========================================================================== */
.left-sidebar {
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
}

.sidebar-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 14px;
}

.section-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: 15px;
}

.sidebar-title-row strong {
  display: block;
  font: 600 13px/1.2 var(--display);
  color: var(--text);
}

.sidebar-title-row small {
  display: block;
  margin-top: 2px;
  color: var(--quiet);
  font-size: 10px;
}

.sidebar-title-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}

.sidebar-section-label {
  padding: 10px 8px 5px;
  color: var(--quiet);
  font: 700 9px var(--mono);
  letter-spacing: 0.12em;
}

.sidebar-section-spaced {
  margin-top: 14px;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.12s ease;
}

.sidebar-link:hover {
  background: var(--surface-2);
  color: var(--text);
}

.sidebar-link.active {
  background: linear-gradient(90deg, var(--accent-subtle), transparent);
  color: var(--text);
  font-weight: 600;
  border-left: 2px solid var(--accent);
}

.sidebar-link.active .sidebar-link-icon {
  color: var(--accent);
}

.sidebar-link-icon {
  display: inline-grid;
  place-items: center;
  width: 16px;
  color: var(--quiet);
}

.sidebar-count {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 18px;
  margin-left: auto;
  padding: 0 6px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: var(--accent-subtle);
  color: var(--accent);
  font: 10px/1 var(--mono);
  font-weight: 600;
}

.side-lock {
  margin-left: auto;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(95, 114, 103, 0.15);
  color: var(--quiet);
  font: 8px var(--mono);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.sidebar-grow {
  flex: 1;
}

.source-card {
  margin: 12px 2px 8px;
  padding: 11px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--accent-subtle), var(--surface-subtle));
  position: relative;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease;
  will-change: transform, box-shadow;
}

.source-card:hover {
  transform: translateY(-2.5px) translateZ(8px);
  border-color: var(--accent);
  box-shadow: 0 14px 28px -6px rgba(0, 0, 0, 0.5),
              0 0 0 1px var(--accent),
              0 0 18px -3px var(--accent-glow);
  z-index: 4;
}

.source-card-top {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--quiet);
  font: 8px var(--mono);
  letter-spacing: 0.08em;
}

.source-indicator {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.source-live {
  margin-left: auto;
  color: var(--accent);
  font-weight: 700;
}

.source-card strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font: 600 12px/1.3 var(--display);
}

.source-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

/* ==========================================================================
   FEED COLUMN
   ========================================================================== */
.feed-column {
  display: flex;
  flex-direction: column;
}

.feed-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 12px 18px 10px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(90deg, var(--accent-subtle), transparent 60%);
}

.feed-title-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.feed-title-icon {
  color: var(--accent);
}

.feed-toolbar h1 {
  margin: 0;
  font: 600 16px/1 var(--display);
  letter-spacing: -0.02em;
  color: var(--text);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: var(--accent-subtle);
  color: var(--accent);
  font: 9px/1 var(--mono);
  font-weight: 700;
  letter-spacing: 0.06em;
}

.live-pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--quiet);
}

.live-pill.live i, .connection-status.online i {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: pulse-live 1.8s ease-in-out infinite;
}

.live-pill.offline {
  color: var(--red);
  border-color: rgba(235, 87, 87, 0.28);
  background: var(--red-subtle);
}

.live-pill.offline i {
  background: var(--red);
  box-shadow: 0 0 6px var(--red);
}

@keyframes pulse-live {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.9); }
}

.feed-subtitle {
  margin: 5px 0 0 26px;
  color: var(--quiet);
  font-size: 11px;
}

.feed-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feed-filter-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 42px;
  padding: 6px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-subtle);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.12s ease;
}

.filter-chip:hover {
  color: var(--text);
  background: var(--surface-2);
}

.filter-chip.active {
  border-color: var(--line-strong);
  background: var(--accent-subtle);
  color: var(--text);
  font-weight: 600;
}

.filter-chip span {
  color: var(--accent);
  font: 10px var(--mono);
}

.filter-divider {
  width: 1px;
  height: 18px;
  margin: 0 6px;
  background: var(--line);
}

.feed-source-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  color: var(--quiet);
  font-size: 10px;
}

.feed-source-label i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.feed-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-color: var(--surface-3) transparent;
  scrollbar-width: thin;
}

.feed-list {
  padding: 12px 14px 40px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  perspective: 1000px;
}

/* 3D Feed Card with Dynamic Hover Lift & Focus */
.feed-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25), 0 0 0 1px var(--line);
  position: relative;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.26s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease,
              background 0.2s ease,
              opacity 0.22s ease,
              filter 0.22s ease;
  will-change: transform, box-shadow;
  transform: translateZ(0);
}

.feed-card:hover,
.feed-card:focus-within {
  transform: translateY(-4px) translateZ(14px) scale(1.008);
  border-color: var(--accent);
  background: var(--surface-3);
  box-shadow: 0 22px 48px -10px rgba(0, 0, 0, 0.75),
              0 8px 20px -4px rgba(0, 0, 0, 0.5),
              inset 0 1px 0 rgba(255, 255, 255, 0.08),
              0 0 0 1px var(--accent),
              0 0 24px -2px var(--accent-glow);
  z-index: 8;
}

/* Depth-of-field focus: non-hovered feed cards soften so eye targets the active widget */
.feed-list:hover .feed-card:not(:hover):not(:focus-within) {
  opacity: 0.82;
  filter: brightness(0.96);
}

.feed-card-header {
  display: flex;
  align-items: center;
  min-height: 54px;
  gap: 11px;
  padding: 10px 14px 8px;
}

.feed-avatar {
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--surface-3);
  object-fit: cover;
}

.feed-avatar-fallback {
  display: grid;
  place-items: center;
  color: #ffffff;
  font: 700 14px/1 var(--display);
  background: linear-gradient(135deg, var(--accent-dark), var(--surface-2));
  border-color: var(--line-strong);
}

.feed-author {
  min-width: 0;
  flex: 1;
}

.feed-name-line {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.feed-display-name {
  overflow: hidden;
  color: var(--text);
  font: 600 13px/1.2 var(--display);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-verified {
  color: var(--accent);
  font-size: 11px;
}

.feed-handle {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feed-view-stat {
  color: var(--quiet);
  font: 10px var(--mono);
  white-space: nowrap;
}

.follow-label {
  padding: 4px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.feed-card-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  margin-left: auto;
  flex: 0 0 auto;
}

.feed-meta {
  color: var(--quiet);
  font: 10px var(--mono);
  white-space: nowrap;
}

.feed-deploy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent-subtle), transparent);
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.feed-deploy-button:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: var(--accent);
  color: #05140d;
  box-shadow: 0 2px 10px var(--accent-glow);
}

.feed-content {
  padding: 2px 14px 12px 62px;
  color: var(--text);
  font-size: 12.5px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.feed-content a {
  color: var(--accent);
  text-decoration: none;
}

.feed-content a:hover {
  text-decoration: underline;
}

.feed-image-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 12px 62px;
}

.feed-image-grid img {
  display: block;
  max-width: min(100%, 320px);
  max-height: 220px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  object-fit: cover;
  background: var(--surface-3);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.feed-image-grid img:hover {
  border-color: var(--line-strong);
  transform: scale(1.01);
}

.feed-image-item { position: relative; display: inline-flex; max-width: min(100%, 320px); }
.feed-image-item img { max-width: 100%; }
.feed-ai-image-button {
  position: absolute; top: 8px; right: 8px; z-index: 2; display: grid; place-items: center;
  width: 32px; height: 32px; padding: 0; border: 1px solid rgba(59, 225, 165, .5); border-radius: 9px;
  background: rgba(8, 28, 21, .9); color: #52e0a9; cursor: pointer; opacity: 0; transform: translateY(-3px);
  box-shadow: 0 5px 18px rgba(0, 0, 0, .28); transition: opacity .16s ease, transform .16s ease, background .16s ease;
}
.feed-image-item:hover .feed-ai-image-button,
.feed-image-item:focus-within .feed-ai-image-button { opacity: 1; transform: translateY(0); }
.feed-ai-image-button:hover { background: #12382b; color: #a0ffe0; }
.feed-ai-image-button .app-svg { width: 16px; height: 16px; }
.feed-selection-deploy {
  position: fixed; z-index: 250; display: inline-flex; align-items: center; gap: 7px; min-height: 34px;
  padding: 0 11px; border: 1px solid rgba(50, 223, 160, .45); border-radius: 9px;
  background: #10251d; color: #7de7bd; box-shadow: 0 10px 30px rgba(0, 0, 0, .45);
  font: 600 11px "DM Sans", sans-serif; cursor: pointer;
}
.feed-selection-deploy[hidden] { display: none; }
.feed-selection-deploy:hover { border-color: #4de4a9; background: #17382b; color: #c2ffe7; }
.feed-selection-deploy .app-svg { width: 14px; height: 14px; }

.feed-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  padding: 0 14px 0 62px;
  border-top: 1px solid var(--line-subtle);
  color: var(--quiet);
  font: 9px/1 var(--mono);
  letter-spacing: 0.06em;
}

.feed-card-footer a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
}

.feed-card-footer a:hover {
  color: var(--accent);
}

.feed-empty {
  min-height: 340px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 20px;
  text-align: center;
}

.empty-graphic {
  position: relative;
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  border: 1px solid var(--line-strong);
  border-radius: 20px;
  background: linear-gradient(145deg, var(--accent-subtle), transparent);
  color: var(--accent);
  font-size: 26px;
}

.empty-graphic i, .empty-graphic b {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid var(--accent);
  border-radius: 50%;
}

.empty-graphic i {
  top: -4px;
  right: -6px;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.empty-graphic b {
  bottom: -4px;
  left: -6px;
  background: var(--yellow);
}

.feed-empty h2 {
  margin: 0;
  color: var(--text);
  font: 600 15px/1.3 var(--display);
}

.feed-empty p {
  max-width: 280px;
  margin: 8px 0 16px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.empty-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 20px;
  color: var(--muted);
  font: 10px/1 var(--mono);
  background: var(--surface-2);
}

.empty-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--yellow);
}

/* ==========================================================================
   RIGHT SIDEBAR: WALLET PANEL
   ========================================================================== */
.right-sidebar {
  display: flex;
  flex-direction: column;
  padding: 0 14px;
}

.right-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
}

.right-panel-header h2 {
  margin: 0;
  font: 600 14px/1.2 var(--display);
  color: var(--text);
}

.right-panel-header p {
  margin: 3px 0 0;
  color: var(--quiet);
  font-size: 10px;
}

.wallet-panel {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 14px 0 0;
  overflow-y: auto;
}

.wallet-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 16px 4px 20px;
}

.wallet-empty-mark {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, var(--accent-subtle), transparent);
  color: var(--accent);
  font-size: 20px;
}

.eyebrow {
  color: var(--quiet);
  font: 700 9px/1 var(--mono);
  letter-spacing: 0.12em;
}

.wallet-empty h3 {
  margin: 8px 0 4px;
  color: var(--text);
  font: 600 15px/1.2 var(--display);
}

.wallet-empty p {
  max-width: 270px;
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.6;
}

.wallet-create-button {
  width: 100%;
}

.wallet-card {
  padding: 14px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: radial-gradient(circle at 100% 0, var(--accent-subtle), transparent 50%),
              linear-gradient(145deg, var(--surface-2), var(--surface));
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.04), var(--shadow-subtle);
  position: relative;
  transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.26s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease;
  will-change: transform, box-shadow;
}

.wallet-card:hover,
.wallet-card:focus-within {
  transform: translateY(-3px) translateZ(10px);
  border-color: var(--accent);
  box-shadow: 0 18px 38px -8px rgba(0, 0, 0, 0.6),
              0 6px 14px -3px rgba(0, 0, 0, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.08),
              0 0 0 1px var(--accent),
              0 0 20px -2px var(--accent-glow);
  z-index: 5;
}

.wallet-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wallet-network {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font: 9px/1 var(--mono);
  letter-spacing: 0.06em;
  font-weight: 600;
}

.network-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.wallet-card-top .icon-button {
  width: 26px;
  height: 26px;
  font-size: 13px;
}

.wallet-balance-label {
  margin-top: 14px;
  color: var(--quiet);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.wallet-balance {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 2px;
}

.wallet-balance strong {
  color: var(--text);
  font: 700 28px/1 var(--display);
  letter-spacing: -0.04em;
}

.wallet-balance span {
  color: var(--accent);
  font: 11px var(--mono);
  font-weight: 700;
}

.wallet-address-label {
  margin-top: 14px;
  color: var(--quiet);
  font: 700 8px var(--mono);
  letter-spacing: 0.1em;
}

.wallet-address-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.2s ease,
              box-shadow 0.2s ease;
}

.wallet-address-row:hover,
.wallet-address-row:focus-within {
  transform: translateY(-1.5px);
  border-color: var(--accent);
  box-shadow: 0 8px 18px -4px rgba(0, 0, 0, 0.4), 0 0 12px -2px var(--accent-glow);
}

.wallet-address-row code {
  overflow: hidden;
  color: var(--text);
  font: 11px/1 var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-address-row .icon-button {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  font-size: 12px;
}

.wallet-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
}

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

.wallet-safety-note {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin: 11px 0 0;
  color: var(--quiet);
  font-size: 10px;
  line-height: 1.5;
}

.wallet-safety-note span {
  color: var(--accent);
  font-size: 8px;
}

.wallet-token-section {
  margin-top: 16px;
  padding-top: 3px;
  border-top: 1px solid var(--line);
}

.wallet-token-section .panel-heading { padding: 11px 0 8px; }
.wallet-token-section .panel-heading h3 { margin: 0; color: var(--text); font: 600 13px/1.2 var(--display); }
.wallet-token-section .panel-heading p { margin: 3px 0 0; color: var(--quiet); font-size: 9px; }
.wallet-token-section .panel-heading .icon-button { width: 27px; height: 27px; }

.wallet-trade-lookup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  margin: 0 0 9px;
}

.wallet-trade-lookup input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: 0;
  background: var(--surface-2);
  color: var(--text);
  font: 9px var(--mono);
}

.wallet-trade-lookup input:focus { border-color: var(--accent); }
.wallet-trade-lookup button { padding: 0 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--accent-subtle); color: var(--accent); font-size: 9px; font-weight: 700; }
.wallet-trade-lookup button:hover { border-color: var(--accent); }
.wallet-token-list { display: grid; gap: 7px; }
.wallet-token-state { padding: 14px 8px; border: 1px dashed var(--line); border-radius: var(--radius-sm); color: var(--quiet); font-size: 10px; line-height: 1.5; text-align: center; }
.wallet-token-row { display: grid; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.wallet-token-info { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wallet-token-info > span:last-child { display: grid; min-width: 0; gap: 2px; }
.wallet-token-info strong { overflow: hidden; color: var(--text); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.wallet-token-info small { color: var(--muted); font: 8px var(--mono); }
.wallet-token-mark { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--accent-subtle); color: var(--accent); font-size: 10px; font-weight: 700; }
.wallet-token-row > code { overflow: hidden; color: var(--quiet); font: 8px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.wallet-token-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.wallet-token-actions button { min-height: 27px; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--surface); color: var(--muted); font-size: 9px; font-weight: 700; }
.wallet-token-actions button:first-child:hover { border-color: var(--accent); color: var(--accent); }
.wallet-token-actions button:last-child:hover { border-color: #fb7185; color: #fb7185; }
.wallet-trade-fee-note { margin: 8px 0 0; color: var(--quiet); font-size: 8px; line-height: 1.5; }

.wallet-trade-overlay { position: fixed; inset: 0; z-index: 260; display: grid; place-items: center; padding: 20px; background: rgba(2, 7, 5, .76); backdrop-filter: blur(8px); }
.wallet-trade-dialog { width: min(440px, 100%); max-height: min(720px, calc(100dvh - 40px)); overflow-y: auto; padding: 18px; border: 1px solid var(--line-strong); border-radius: var(--radius-lg); background: radial-gradient(circle at 100% 0, var(--accent-subtle), transparent 43%), var(--surface); box-shadow: 0 26px 90px rgba(0, 0, 0, .58); }
.wallet-trade-picker { width: min(500px, 100%); }
.wallet-trade-picker #walletTradeLookupModal { display: grid; gap: 10px; margin-top: 16px; }
.wallet-trade-picker-label { display: grid; gap: 7px; color: var(--quiet); font: 700 8px var(--mono); letter-spacing: .08em; }
.wallet-trade-picker-label input { width: 100%; height: 40px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); outline: 0; background: var(--surface-2); color: var(--text); font: 10px var(--mono); letter-spacing: 0; }
.wallet-trade-picker-label input:focus { border-color: var(--accent); }
.wallet-trade-picker .wallet-trade-tabs { margin-top: 1px; }
.wallet-trade-picker-holdings { display: grid; gap: 8px; margin-top: 17px; padding-top: 14px; border-top: 1px solid var(--line); }
.wallet-trade-picker .wallet-token-list { max-height: 230px; overflow-y: auto; padding-right: 2px; }
.wallet-trade-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.wallet-trade-kicker { color: var(--accent); font: 700 8px var(--mono); letter-spacing: .08em; }
.wallet-trade-header h2 { margin: 6px 0 2px; color: var(--text); font: 700 20px/1.1 var(--display); }
.wallet-trade-header p { margin: 0; color: var(--muted); font-size: 11px; }
.wallet-trade-header p strong { color: var(--accent); font: 700 9px var(--mono); }
.wallet-trade-mint { display: grid; gap: 5px; margin: 15px 0 12px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.wallet-trade-mint small { color: var(--quiet); font: 700 8px var(--mono); letter-spacing: .08em; }
.wallet-trade-mint code { overflow: hidden; color: var(--muted); font: 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.wallet-trade-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface-2); }
.wallet-trade-tabs button { min-height: 33px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--muted); font-size: 10px; font-weight: 700; }
.wallet-trade-tabs button.active { border-color: var(--line-strong); background: var(--accent-subtle); color: var(--accent); }
#walletTradeForm { display: grid; gap: 11px; margin-top: 13px; }
.wallet-trade-buy-fields { display: grid; gap: 7px; }
.wallet-trade-buy-fields[hidden], .wallet-trade-sell-fields[hidden] { display: none; }
.wallet-trade-buy-fields label { display: grid; gap: 6px; color: var(--muted); font-size: 10px; }
.wallet-trade-buy-fields input { width: 100%; height: 42px; padding: 0 11px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); outline: 0; background: var(--surface-2); color: var(--text); font: 14px var(--mono); }
.wallet-trade-buy-fields input:focus { border-color: var(--accent); }
.wallet-trade-buy-fields p { margin: 0; color: var(--quiet); font-size: 9px; }
.wallet-trade-sell-fields { display: grid; gap: 7px; color: var(--muted); font-size: 10px; }
.wallet-sell-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.wallet-sell-presets button { min-height: 34px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font: 9px var(--mono); }
.wallet-sell-presets button.active { border-color: var(--accent); background: var(--accent-subtle); color: var(--accent); }
.wallet-trade-fees { margin: 0; color: var(--quiet); font-size: 9px; line-height: 1.55; }
.wallet-trade-error { min-height: 17px; color: var(--muted); font-size: 10px; line-height: 1.5; overflow-wrap: anywhere; }
.wallet-trade-error a { color: var(--accent); }
.wallet-trade-submit { width: 100%; min-height: 40px; }

.token-market-overlay { position: fixed; inset: 0; z-index: 255; display: grid; place-items: center; padding: 18px; background: rgba(2, 5, 4, .84); backdrop-filter: blur(8px); }
.token-market-dialog { display: flex; width: min(1540px, 100%); height: min(920px, calc(100dvh - 36px)); min-height: 0; flex-direction: column; overflow: hidden; border: 1px solid var(--line-strong); border-radius: 16px; background: #080b0e; color: var(--text); box-shadow: 0 30px 100px rgba(0, 0, 0, .65); }
.token-market-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 70px; padding: 12px 18px; border-bottom: 1px solid rgba(255, 255, 255, .08); background: rgba(10, 14, 16, .96); }
.token-market-title { display: flex; align-items: center; gap: 11px; min-width: 0; }
.token-market-mark { display: grid; width: 40px; height: 40px; flex: 0 0 40px; place-items: center; border: 1px solid rgba(38, 202, 146, .3); border-radius: 50%; background: rgba(21, 166, 118, .13); color: var(--accent); font: 700 16px var(--display); }
.token-market-title > span:last-child { display: grid; gap: 4px; min-width: 0; }
.token-market-title strong { overflow: hidden; color: #f1f6f4; font: 700 15px var(--display); text-overflow: ellipsis; white-space: nowrap; }
.token-market-title strong small { margin-left: 4px; color: var(--accent); font: 700 11px var(--mono); }
.token-market-title code { overflow: hidden; color: #7f908a; font: 9px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.token-market-header-actions { display: flex; align-items: center; gap: 7px; }
.token-market-header-actions .button { min-height: 31px; padding: 0 9px; font-size: 9px; text-decoration: none; }
.token-market-header-actions .icon-button { width: 32px; height: 32px; }
.token-market-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; flex: 1; min-height: 0; }
.token-market-main { display: flex; min-width: 0; min-height: 0; flex-direction: column; gap: 12px; overflow-y: auto; padding: 14px; }
.token-market-stats { display: grid; grid-template-columns: 1.3fr repeat(3, 1fr); gap: 8px; }
.token-market-stats > div { display: grid; min-width: 0; gap: 5px; padding: 9px 11px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 9px; background: #0d1114; }
.token-market-stats small, .token-market-side-stats small { color: #71817b; font: 700 8px var(--mono); letter-spacing: .08em; }
.token-market-stats strong { overflow: hidden; color: #e6eeeb; font: 650 14px var(--display); text-overflow: ellipsis; white-space: nowrap; }
.token-market-stats .token-market-price strong { color: #fff; font-size: 20px; }
.token-market-stats strong.positive { color: #29ca91; }
.token-market-stats strong.negative { color: #ef626a; }
.token-market-chart-card, .token-market-recent { min-width: 0; border: 1px solid rgba(255, 255, 255, .08); border-radius: 10px; background: #0b0f12; }
.token-market-chart-card { display: flex; min-height: 390px; flex: 1 0 420px; flex-direction: column; overflow: hidden; }
.token-market-chart-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 8px 12px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.token-market-chart-head > div:first-child { display: grid; gap: 3px; }
.token-market-chart-head strong { color: #e5eeea; font-size: 11px; }
.token-market-chart-head small { color: #73847d; font: 8px var(--mono); }
.token-market-intervals { display: flex; gap: 3px; }
.token-market-intervals button { min-width: 32px; height: 25px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: #81918b; font: 700 8px var(--mono); }
.token-market-intervals button:hover, .token-market-intervals button.active { border-color: rgba(39, 203, 146, .25); background: rgba(26, 162, 114, .12); color: #30d39a; }
.token-market-chart { position: relative; display: grid; min-height: 300px; flex: 1; place-items: stretch; overflow: hidden; }
.token-market-candles { display: block; width: 100%; height: 100%; min-height: 300px; }
.market-chart-background { fill: #090c0f; }
.market-chart-gridline { stroke: rgba(174, 190, 183, .11); stroke-width: 1; }
.market-chart-axis-label, .market-chart-time-label { fill: #768680; font: 11px ui-monospace, monospace; }
.market-candle line { stroke-width: 1.2; }
.market-candle.up line, .market-candle.up rect { stroke: #25c795; fill: #25a987; }
.market-candle.down line, .market-candle.down rect { stroke: #ef626a; fill: #dd555d; }
.token-market-chart-empty { display: grid; min-height: 300px; align-content: center; justify-items: center; gap: 9px; padding: 26px; color: #798981; text-align: center; }
.token-market-chart-empty > span:not(.button-spinner) { color: var(--accent); font-size: 24px; }
.token-market-chart-empty strong { color: #c9d3cf; font-size: 12px; }
.token-market-chart-empty small { max-width: 420px; font-size: 10px; line-height: 1.55; }
.token-market-chart-foot { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-top: 1px solid rgba(255, 255, 255, .06); color: #72817b; font: 8px var(--mono); }
.token-market-recent { padding: 0 10px 8px; }
.token-market-section-heading { display: flex; align-items: center; justify-content: space-between; min-height: 40px; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.token-market-section-heading strong { color: #dfe8e4; font-size: 10px; }
.token-market-section-heading small { color: #71817b; font: 8px var(--mono); }
.token-market-trades-head, .token-market-trade-row { display: grid; grid-template-columns: .7fr 1fr 1fr .8fr; align-items: center; gap: 8px; }
.token-market-trades-head { padding: 8px 4px 6px; color: #65756e; font: 700 7px var(--mono); text-transform: uppercase; }
.token-market-trade-row { min-height: 33px; border-top: 1px solid rgba(255, 255, 255, .04); font-size: 9px; }
.token-market-trade-row > span { color: #a8b5af; }
.token-market-trade-row > span.buy { color: #28ca91; }
.token-market-trade-row > span.sell { color: #f16d75; }
.token-market-trade-row strong { color: #dce5e0; font: 600 9px var(--mono); }
.token-market-trade-row code, .token-market-trade-row small { overflow: hidden; color: #798981; font: 8px var(--mono); text-overflow: ellipsis; white-space: nowrap; }
.token-market-trade-row a { color: var(--accent); text-decoration: none; }
.token-market-trades-empty { padding: 14px 5px; color: #71817b; font-size: 9px; text-align: center; }
.token-market-side { display: flex; min-height: 0; flex-direction: column; gap: 12px; overflow-y: auto; padding: 14px; border-left: 1px solid rgba(255, 255, 255, .08); background: #0a0d10; }
.token-market-side-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.token-market-side-stats > div { display: grid; gap: 5px; padding: 10px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 8px; background: #0e1215; }
.token-market-side-stats strong { color: #e3ece7; font: 650 12px var(--display); }
.token-market-trade-box { display: grid; gap: 12px; padding: 13px; border: 1px solid rgba(255, 255, 255, .09); border-radius: 10px; background: #0d1114; }
.token-market-trade-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.token-market-trade-title > div { display: grid; gap: 4px; }
.token-market-trade-title strong { color: #e9f0ed; font: 700 13px var(--display); }
.token-market-trade-title small { color: #71817b; font-size: 9px; }
.market-network-dot { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid rgba(137, 89, 255, .28); border-radius: 50%; background: rgba(137, 89, 255, .1); color: #b7a0ff; font: 700 8px var(--mono); }
.token-market-trade-box .wallet-trade-tabs { width: 100%; }
.token-market-buy-fields, .token-market-sell-fields { display: grid; gap: 8px; }
.token-market-buy-fields[hidden], .token-market-sell-fields[hidden] { display: none; }
.token-market-buy-fields > small, .token-market-sell-fields > small { color: #72827b; font: 700 8px var(--mono); }
.token-market-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; }
.token-market-presets button { min-height: 31px; border: 1px solid rgba(41, 201, 145, .2); border-radius: 6px; background: rgba(29, 136, 102, .11); color: #49d6a5; font: 700 9px var(--mono); }
.token-market-presets button:hover, .token-market-presets button.active { border-color: #22c58c; background: rgba(30, 163, 117, .2); color: #73e8bd; }
.token-market-sell-presets button { border-color: rgba(239, 98, 106, .18); background: rgba(164, 54, 62, .11); color: #ee8288; }
.token-market-sell-presets button:hover, .token-market-sell-presets button.active { border-color: #ef626a; background: rgba(164, 54, 62, .22); color: #ffa2a7; }
.token-market-amount { display: flex; align-items: center; height: 38px; padding: 0 9px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 7px; background: #080b0e; }
.token-market-amount input { width: 100%; height: 100%; border: 0; outline: 0; background: transparent; color: #e7efeb; font: 12px var(--mono); }
.token-market-amount span { color: var(--accent); font: 700 9px var(--mono); }
.token-market-sell-fields p { margin: 0; color: #778780; font-size: 9px; line-height: 1.5; }
.token-market-fee-note { margin: -2px 0 0; color: #72817a; font-size: 8px; line-height: 1.5; }
.token-market-trade-status { min-height: 15px; color: #9daaa4; font-size: 9px; line-height: 1.5; overflow-wrap: anywhere; }
.token-market-trade-status a { color: var(--accent); }
.token-market-submit { width: 100%; min-height: 40px; }
.token-market-unlock { width: 100%; min-height: 36px; }
.token-market-links { display: grid; gap: 5px; margin-top: auto; color: #83928c; font: 9px var(--mono); }
.token-market-links small { color: #63736c; font: 8px var(--mono); line-height: 1.5; }

@media (max-width: 900px) {
  .token-market-dialog { height: min(920px, calc(100dvh - 18px)); }
  .token-market-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  .token-market-side { padding: 10px; }
}
@media (max-width: 680px) {
  .token-market-overlay { padding: 6px; }
  .token-market-dialog { height: calc(100dvh - 12px); border-radius: 12px; }
  .token-market-header { align-items: flex-start; padding: 10px; }
  .token-market-header-actions { flex-wrap: wrap; justify-content: flex-end; }
  .token-market-header-actions .button { font-size: 8px; }
  .token-market-layout { display: flex; flex-direction: column; overflow-y: auto; }
  .token-market-main { overflow: visible; padding: 9px; }
  .token-market-stats { grid-template-columns: 1fr 1fr; }
  .token-market-chart-card { flex: 0 0 380px; min-height: 380px; }
  .token-market-chart-head { align-items: flex-start; flex-direction: column; }
  .token-market-chart { min-height: 280px; }
  .token-market-candles { min-height: 280px; }
  .token-market-chart-foot { flex-direction: column; }
  .token-market-side { overflow: visible; padding: 9px; border-top: 1px solid rgba(255, 255, 255, .08); border-left: 0; }
  .token-market-links { margin-top: 0; }
}

.deploys-section {
  margin-top: 18px;
  border-top: 1px solid var(--line);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 0 10px;
}

.panel-heading h3 {
  margin: 0;
  font: 600 13px/1.2 var(--display);
  color: var(--text);
}

.panel-heading p {
  margin: 3px 0 0;
  color: var(--quiet);
  font-size: 10px;
}

.soon-pill {
  padding: 3px 7px;
  border: 1px solid rgba(230, 177, 66, 0.28);
  border-radius: 4px;
  background: rgba(230, 177, 66, 0.08);
  color: var(--amber);
  font: 8px var(--mono);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.deploys-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 11px;
}

.empty-orbit {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font-size: 14px;
}

.right-panel-foot {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: auto;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  color: var(--quiet);
  font-size: 10px;
  line-height: 1.5;
}

.security-shield {
  color: var(--accent);
  font-size: 13px;
  flex-shrink: 0;
}

/* ==========================================================================
   BOTTOM BAR
   ========================================================================== */
.bottom-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
  padding: 0 16px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  position: relative;
  z-index: 40;
}

.bottom-left, .bottom-right {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.connection-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 24px;
  margin-right: 6px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font: 9px/1 var(--mono);
  background: var(--surface-2);
  white-space: nowrap;
}

.connection-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--quiet);
}

.connection-status.online {
  color: var(--accent);
  border-color: var(--line-strong);
}

.bottom-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.12s ease;
}

.bottom-tab:hover, .bottom-tab.active {
  border-color: var(--line);
  background: var(--surface-2);
  color: var(--text);
}

.network-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 8px;
  color: var(--muted);
  font: 9px/1 var(--mono);
  white-space: nowrap;
}

.network-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.sol-price-ticker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  font: 9px/1 var(--mono);
  white-space: nowrap;
  transition: border-color 0.15s ease;
}

.sol-price-ticker .solana-mark {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
}

.sol-price-ticker strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.sol-price-ticker[data-stale="true"] strong {
  color: var(--quiet);
}

.bottom-icon {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--quiet);
  cursor: pointer;
  transition: all 0.12s ease;
}

.bottom-icon:hover {
  background: var(--surface-2);
  color: var(--text);
}

/* ==========================================================================
   MODALS & OVERLAYS
   ========================================================================== */
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 24px;
  background: rgba(4, 7, 6, 0.82);
  backdrop-filter: blur(14px);
}

.auth-backdrop-shape {
  position: fixed;
  width: 400px;
  height: 400px;
  border: 1px solid var(--line);
  border-radius: 50%;
  pointer-events: none;
}

.shape-one {
  top: -200px;
  left: -120px;
  box-shadow: 0 0 0 50px rgba(36, 201, 138, 0.02), 0 0 0 100px rgba(36, 201, 138, 0.015);
}

.shape-two {
  right: -120px;
  bottom: -200px;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 460px);
  padding: 28px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, var(--surface), var(--bg));
  box-shadow: var(--shadow-elevated), inset 0 1px rgba(255, 255, 255, 0.04);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.brand-mark-small {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  color: var(--accent);
  font-weight: 700;
}

.brand-mark-small svg {
  width: 24px;
  height: 24px;
}

.auth-brand > span:last-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-brand strong {
  color: var(--text);
  font: 700 12px/1 var(--display);
  letter-spacing: 0.06em;
}

.auth-brand small {
  color: var(--accent);
  font: 600 8px/1 var(--display);
  letter-spacing: 0.18em;
}

.auth-kicker {
  color: var(--accent);
  font: 700 9px var(--mono);
  letter-spacing: 0.14em;
}

.auth-card h1 {
  margin: 8px 0 6px;
  color: var(--text);
  font: 600 24px/1.2 var(--display);
  letter-spacing: -0.04em;
}

.auth-description {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 20px 0 16px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.auth-tab {
  min-height: 32px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  transition: all 0.12s ease;
}

.auth-tab.active {
  background: var(--accent-subtle);
  color: var(--text);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

.form-field input, .form-field textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  outline: none;
  background: var(--surface-2);
  color: var(--text);
  font: 12px var(--body);
  transition: all 0.15s ease;
}

.form-field input:focus, .form-field textarea:focus {
  border-color: var(--line-focus);
  box-shadow: 0 0 0 3px var(--accent-subtle);
  background: var(--surface-3);
}

.form-field input::placeholder, .form-field textarea::placeholder {
  color: var(--quiet);
}

.auth-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(230, 177, 66, 0.24);
  border-radius: var(--radius-sm);
  background: rgba(230, 177, 66, 0.06);
  color: var(--amber);
}

.auth-warning p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.auth-error {
  min-height: 0;
  color: var(--red);
  font-size: 11px;
  line-height: 1.4;
}

.auth-submit {
  width: 100%;
  min-height: 40px;
  margin-top: 4px;
}

.auth-footnote {
  padding-top: 6px;
  color: var(--quiet);
  font-size: 10px;
  text-align: center;
}

.auth-link-button {
  display: block;
  margin: 14px auto 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font-size: 11px;
}

.auth-link-button:hover {
  text-decoration: underline;
}

/* Deploy Dialog Specifics */
.deploy-card, .vamp-card, .preferences-card {
  width: min(100%, 540px);
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  padding: 24px;
}

.deploy-modal-brand {
  margin-bottom: 16px !important;
}

.deploy-close, .vamp-close, .pref-close {
  margin-left: auto;
}

.deploy-modal-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}

.deploy-kicker {
  color: var(--accent);
  font: 700 9px var(--mono);
  letter-spacing: 0.16em;
}

.deploy-modal-title h1 {
  margin: 6px 0 4px;
  color: var(--text);
  font: 600 22px/1.2 var(--display);
  letter-spacing: -0.03em;
}

.deploy-modal-title p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.deploy-chain-badge {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--accent-subtle);
  color: var(--accent);
  font: 9px/1 var(--mono);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.deploy-fields-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.deploy-form .form-field {
  gap: 5px;
  color: var(--muted);
  font: 700 9px var(--mono);
  letter-spacing: 0.08em;
}

.deploy-form .form-field > span, .deploy-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.deploy-form .form-field small, .deploy-section-heading small {
  color: var(--quiet);
  font: 9px var(--mono);
  letter-spacing: 0;
  font-weight: 400;
}

.deploy-description-field {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.deploy-description-field summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 0 11px;
  color: var(--text);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  list-style: none;
}

.deploy-description-field summary::-webkit-details-marker {
  display: none;
}

.deploy-description-field summary span {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 400;
}

.deploy-description-field textarea {
  display: block;
  width: 100%;
  min-height: 72px;
  padding: 9px 11px;
  border: 0 !important;
  border-top: 1px solid var(--line) !important;
  border-radius: 0 !important;
  resize: vertical;
}

.deploy-social-input {
  position: relative;
}

.deploy-social-input input {
  padding-right: 36px !important;
}

.deploy-social-input > span {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--accent);
  font: 13px var(--display);
}

.deploy-image-section, .deploy-buy-section {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.deploy-image-row {
  display: flex;
  align-items: stretch;
  flex-wrap: wrap;
  gap: 8px;
}

.deploy-image-preview {
  display: flex;
  align-items: center;
  align-content: flex-start;
  flex: 1 1 260px;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 64px;
}

.deploy-image-choice {
  position: relative;
  display: block;
  width: 62px;
  height: 62px;
  flex: 0 0 62px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  cursor: pointer;
  transition: all 0.15s ease;
}

.deploy-image-choice-wrap { position: relative; width: 62px; height: 62px; flex: 0 0 62px; }
.deploy-image-choice-wrap .deploy-image-choice { width: 100%; height: 100%; }
.deploy-ai-image-edit {
  position: absolute; top: 4px; right: 4px; z-index: 2; display: grid; place-items: center;
  width: 22px; height: 22px; padding: 0; border: 1px solid rgba(61, 223, 165, .62); border-radius: 7px;
  background: rgba(7, 33, 23, .94); color: #68ebba; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .32);
}
.deploy-ai-image-edit:hover { background: #174a35; color: #d1ffeb; }
.deploy-ai-image-edit .app-svg { width: 13px; height: 13px; }

.deploy-image-choice img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.deploy-image-choice:hover {
  border-color: var(--accent);
}

.deploy-image-choice.selected {
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 2px var(--accent-subtle);
}

.deploy-image-choice > span {
  position: absolute;
  right: 3px;
  bottom: 3px;
  display: grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent);
  color: #04120a;
  font-size: 10px;
  font-weight: 800;
}

.deploy-image-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 62px;
  height: 62px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--quiet);
  font-size: 16px;
}

.deploy-image-placeholder small {
  font-size: 8px;
}

.deploy-upload-control {
  position: relative;
  display: flex;
  flex: 0 0 100px;
  min-height: 62px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 6px;
  overflow: hidden;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.deploy-upload-control:hover {
  border-color: var(--accent);
  background: var(--surface-3);
}

.deploy-upload-control strong {
  font-size: 10px;
}

.deploy-upload-control small {
  color: var(--muted);
  font-size: 8px;
}

.deploy-upload-control input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.deploy-image-hint {
  color: var(--accent);
  font-size: 10px;
}

.deploy-platform-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 8px;
}

.deploy-platform-row > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.deploy-platform-row small {
  color: var(--quiet);
  font: 700 8px var(--mono);
  letter-spacing: 0.08em;
}

.deploy-platform-row strong {
  color: var(--text);
  font-size: 11px;
}

.deploy-platform-selected {
  border-color: var(--line-strong) !important;
  background: var(--accent-subtle) !important;
}

.deploy-platform-selected i {
  margin-left: 6px;
  color: var(--accent);
  font-size: 9px;
  font-style: normal;
}

.deploy-buy-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.deploy-buy-presets button {
  min-height: 30px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
  transition: all 0.12s ease;
}

.deploy-buy-presets button:hover, .deploy-buy-presets button.active {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--text);
  font-weight: 600;
}

.deploy-buy-input {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
}

.deploy-buy-input > span:last-child {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 120px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}

.deploy-buy-input input {
  width: 100%;
  height: 32px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: var(--text);
  font-weight: 600;
}

.deploy-buy-input b {
  color: var(--accent);
  font: 10px var(--mono);
}

.deploy-submit {
  min-height: 42px;
  font-size: 12px;
}

.deploy-sign-note {
  color: var(--quiet);
  font-size: 10px;
  text-align: center;
  margin-top: -2px;
}

/* VAMP Modal */
.vamp-card {
  width: min(100%, 500px);
}

.vamp-search {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 4px 6px 4px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--accent);
  transition: border-color 0.15s ease;
}

.vamp-search:focus-within {
  border-color: var(--line-focus);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.vamp-search input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--text);
  font: 12px var(--body);
}

.vamp-search button {
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #04120a;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.vamp-search-hint {
  color: var(--quiet);
  font-size: 10px;
  margin-top: 5px;
}

.vamp-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 80px;
  color: var(--muted);
  font-size: 11px;
}

.vamp-token-card {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.vamp-token-main {
  display: flex;
  align-items: center;
  gap: 12px;
}

.vamp-token-logo {
  display: block;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-3);
  object-fit: cover;
}

.vamp-token-details {
  flex: 1;
  min-width: 0;
}

.vamp-token-details strong {
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text);
  font: 600 13px/1.2 var(--display);
}

.vamp-token-details strong span {
  color: var(--accent);
  font: 11px var(--mono);
}

.vamp-token-details code {
  color: var(--quiet);
  font: 9px var(--mono);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vamp-open-pump {
  padding: 6px 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--accent);
  font: 10px var(--mono);
  text-decoration: none;
  font-weight: 600;
}

.vamp-description {
  max-height: 100px;
  overflow-y: auto;
  margin: 12px 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.vamp-socials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 14px;
}

.vamp-socials a {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-size: 10px;
  text-decoration: none;
  background: var(--surface-subtle);
}

.vamp-socials a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ==========================================================================
   PREFERENCES PANEL
   ========================================================================== */
.preferences-card {
  width: min(100%, 520px);
}

.pref-section {
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.pref-section:first-of-type {
  border-top: 0;
  padding-top: 6px;
}

.pref-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.pref-section-title h3 {
  margin: 0;
  font: 600 13px/1 var(--display);
  color: var(--text);
}

.pref-section-title small {
  color: var(--quiet);
  font-size: 10px;
}

/* Palette selection grid */
.theme-palette-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.theme-palette-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 10px 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  transition: all 0.15s ease;
  cursor: pointer;
}

.theme-palette-chip:hover {
  border-color: var(--accent);
  color: var(--text);
}

.theme-palette-chip.active {
  border: 2px solid var(--accent);
  background: var(--accent-subtle);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 0 12px var(--accent-glow);
}

.palette-swatch {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid var(--surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.swatch-emerald { background: #24c98a; }
.swatch-forest { background: #2bb673; }
.swatch-ocean { background: #14f1d9; }
.swatch-violet { background: #a855f7; }

/* Dashboard layout controls */
.layout-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}

.layout-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-size: 11px;
  color: var(--text);
}

.layout-toggle-row span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.layout-toggle-row input[type="checkbox"] {
  accent-color: var(--accent);
  cursor: pointer;
  width: 16px;
  height: 16px;
}

.pref-footer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   TOAST & UTILITIES
   ========================================================================== */
.toast {
  position: fixed;
  right: 20px;
  bottom: 54px;
  z-index: 300;
  max-width: min(360px, calc(100vw - 40px));
  padding: 10px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  color: var(--text);
  box-shadow: var(--shadow-elevated);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 11px;
  font-weight: 500;
}

.toast.visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.success {
  border-color: var(--line-strong);
}

.toast.error {
  border-color: rgba(235, 87, 87, 0.4);
  color: var(--red);
}

.button-spinner {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* Responsive adjustments */
@media (max-width: 1180px) {
  .workspace-layout {
    grid-template-columns: 170px minmax(280px, 1fr) 230px 260px;
    gap: 8px;
    padding-inline: 8px;
  }
  .top-search {
    width: min(260px, 22vw);
  }
}

@media (max-width: 900px) {
  body {
    overflow-y: auto;
  }
  .workspace-switch, .top-actions .top-action:not(.top-action-create) {
    display: none;
  }
  .workspace-layout {
    grid-template-columns: 58px minmax(0, 1fr);
    height: auto;
    min-height: calc(100dvh - 96px);
  }
  .left-sidebar {
    padding: 10px 6px;
  }
  .sidebar-title-row > div:not(.section-icon),
  .sidebar-section-label,
  .sidebar-link span:not(.sidebar-link-icon),
  .source-card {
    display: none;
  }
  .sidebar-link {
    justify-content: center;
    padding: 0;
    min-height: 38px;
  }
  .right-sidebar {
    grid-column: 2;
  }
  .chat-widget {
    grid-column: 2;
    min-height: 520px;
  }
}

@media (max-width: 600px) {
  .topbar {
    height: 52px;
    padding-inline: 10px;
    gap: 8px;
  }
  .top-search {
    flex: 1;
    width: auto;
    margin-left: 0;
  }
  .top-search kbd, .top-actions {
    display: none;
  }
  .workspace-layout {
    grid-template-columns: 1fr;
    padding: 6px;
  }
  .left-sidebar {
    display: none;
  }
  .feed-content, .feed-image-grid, .feed-card-footer {
    padding-left: 14px;
  }
  .theme-toggle-label {
    display: none;
  }
  .theme-toggle {
    width: 32px;
    padding: 0;
  }
}
/* ==========================================================================
   PREFERENCES UI — styles for the classes rendered by app.js
   ========================================================================== */
.preferences-sections {
  display: flex;
  flex-direction: column;
  max-height: min(64vh, 560px);
  overflow-y: auto;
  margin-top: 14px;
  padding-right: 4px;
  scrollbar-color: var(--line-strong) transparent;
  scrollbar-width: thin;
}

.preferences-section {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.preferences-section:first-child {
  border-top: 0;
  padding-top: 2px;
}

.preferences-section-label {
  display: block;
  color: var(--quiet);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .11em;
  line-height: 1.4;
}

.theme-mode-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

button.theme-mode-btn,
button.palette-option {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  color: var(--muted);
  font: inherit;
  text-align: left;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  transition: border-color .15s ease, background .15s ease, color .15s ease, box-shadow .15s ease;
}

button.theme-mode-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 42px;
  padding: 9px 12px;
  border-radius: var(--radius-md);
  font-size: 11px;
  font-weight: 600;
}

.theme-mode-btn .app-svg {
  width: 16px;
  height: 16px;
}

.theme-mode-btn:hover,
.palette-option:hover {
  color: var(--text);
  border-color: var(--accent);
  background: var(--surface-3);
}

.theme-mode-btn.active {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-subtle);
  box-shadow: 0 0 0 1px var(--accent-subtle);
}

.theme-palette-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 0;
}

button.palette-option {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 9px 11px;
  border-radius: var(--radius-md);
  cursor: pointer;
}

.palette-option.selected {
  color: var(--text);
  border-color: var(--accent);
  background: var(--accent-subtle);
  box-shadow: inset 0 0 0 1px var(--accent-subtle);
}

.palette-swatch {
  width: 20px;
  height: 20px;
  border: 0;
  box-shadow: 0 0 0 3px var(--surface-3);
}

.palette-info {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.palette-info strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
}

.palette-info small {
  color: var(--quiet);
  font-size: 9px;
  line-height: 1.3;
}

.palette-check {
  display: grid;
  width: 16px;
  height: 16px;
  place-items: center;
  color: var(--accent);
  opacity: 0;
}

.palette-check .app-svg {
  width: 14px;
  height: 14px;
}

.palette-option.selected .palette-check {
  opacity: 1;
}

.preferences-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preferences-section-header .button-sm {
  flex: 0 0 auto;
  min-height: 28px;
  padding: 5px 8px;
  font-size: 9px;
}

.layout-toggle-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-top: 0;
}

.layout-toggle-row {
  min-height: 54px;
  gap: 12px;
  padding: 9px 11px;
  border-radius: var(--radius-md);
}

.layout-toggle-text {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.layout-toggle-text strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 650;
}

.layout-toggle-text small {
  color: var(--quiet);
  font-size: 9px;
  line-height: 1.35;
}

.switch-toggle {
  position: relative;
  display: inline-flex;
  width: 38px;
  height: 22px;
  flex: 0 0 auto;
}

.switch-toggle input {
  position: absolute;
  z-index: 1;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--surface-3);
  transition: background .16s ease, border-color .16s ease;
  pointer-events: none;
}

.switch-slider::before {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--muted);
  content: "";
  transition: transform .16s ease, background .16s ease;
}

.switch-toggle input:checked + .switch-slider {
  border-color: var(--accent);
  background: var(--accent-subtle);
}

.switch-toggle input:checked + .switch-slider::before {
  background: var(--accent);
  transform: translateX(16px);
}

.switch-toggle input:focus-visible + .switch-slider {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.drag-hint-box {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
  color: var(--muted);
  font-size: 10px;
  line-height: 1.45;
}

.drag-hint-box .app-svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  color: var(--accent);
}

/* Reset native button chrome on the panel grips so the SVG is the visible icon. */
button.panel-drag-handle {
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
}

.panel-drag-handle .app-svg {
  fill: currentColor;
  stroke: none;
}

.panel-drag-handle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.app-svg {
  stroke-linejoin: round;
}

@media (max-width: 560px) {
  .preferences-sections {
    max-height: calc(100vh - 205px);
  }

  .theme-palette-grid {
    gap: 7px;
  }

  button.palette-option {
    grid-template-columns: 20px minmax(0, 1fr) 14px;
    gap: 7px;
    padding: 8px;
  }

  .palette-swatch {
    width: 18px;
    height: 18px;
  }
}

/* Account and wallet dropdowns: keep dynamic auth UI inside styled overlays. */
.account-menu,
.wallet-popover {
  position: absolute;
  top: calc(100% + 8px);
  z-index: 90;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background: var(--surface-elevated);
  color: var(--text);
  box-shadow: var(--shadow-elevated);
}

.account-menu {
  right: 0;
  display: flex;
  width: min(276px, calc(100vw - 24px));
  flex-direction: column;
  gap: 5px;
  padding: 8px;
}

.wallet-popover {
  right: 40px;
  width: min(310px, calc(100vw - 24px));
  padding: 14px;
}

.account-menu-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 8px 7px 10px;
  border-bottom: 1px solid var(--line);
}

.account-profile-avatar {
  position: relative;
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  overflow: hidden;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  font: 700 13px var(--display);
}

.account-menu-profile > span:last-child {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 3px;
}

.account-menu-profile strong {
  color: var(--text);
  font-size: 11px;
}

.account-menu-profile small {
  overflow: hidden;
  max-width: 205px;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu-address,
.wallet-popover-address {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 6px;
  margin: 3px 0;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.account-menu-address small,
.wallet-popover-address small,
.wallet-popover-balance > small,
.wallet-popover-heading small {
  color: var(--quiet);
  font: 700 8px var(--mono);
  letter-spacing: .1em;
}

.account-menu-address code,
.wallet-popover-address code {
  overflow: hidden;
  color: var(--text);
  font: 10px var(--mono);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-trade-open {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  width: 100%;
  margin-top: 10px;
  padding: 9px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: linear-gradient(110deg, var(--accent-subtle), var(--surface-2));
  color: var(--accent);
  text-align: left;
}
.wallet-trade-open > span:first-child { display: grid; width: 27px; height: 27px; place-items: center; border: 1px solid var(--line-strong); border-radius: 8px; font-size: 17px; }
.wallet-trade-open > span:nth-child(2) { display: grid; gap: 3px; }
.wallet-trade-open strong { color: var(--text); font-size: 11px; }
.wallet-trade-open small { color: var(--muted); font-size: 9px; }
.wallet-trade-open:hover { border-color: var(--accent); box-shadow: 0 0 14px -6px var(--accent-glow); }

.account-menu > button[role="menuitem"] {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 34px;
  padding: 0 9px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  text-align: left;
}

.account-menu > button[role="menuitem"]:hover {
  background: var(--surface-2);
  color: var(--text);
}

.account-menu > button.menu-danger {
  color: var(--red);
}

.account-menu > button.menu-danger:hover {
  background: var(--red-subtle);
  color: var(--red);
}

.wallet-popover-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.wallet-popover-heading > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wallet-popover-heading strong {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font: 700 9px var(--mono);
}

.wallet-popover-heading strong i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent-glow);
}

.wallet-popover-balance {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 13px 2px 9px;
}

.wallet-popover-balance > div {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.wallet-popover-balance strong {
  color: var(--text);
  font: 700 25px/1 var(--display);
}

.wallet-popover-balance span {
  color: var(--accent);
  font: 700 9px var(--mono);
}

.wallet-popover-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-top: 10px;
}

.wallet-popover-actions button {
  min-height: 34px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
  font-size: 10px;
  font-weight: 600;
}

.wallet-popover-actions button:hover {
  border-color: var(--accent);
  background: var(--accent-subtle);
  color: var(--accent);
}

@media (max-width: 560px) {
  .wallet-popover {
    right: 0;
  }
}


/* React shell keeps the reference dashboard at full viewport height. */
#root {
  width: 100%;
  min-width: 0;
  height: 100%;
}

.react-dashboard-shell {
  display: contents;
}

.app-shell {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100dvh;
  min-height: 0;
}

.brand-mark:has(.brand-mascot) {
  width: 38px;
  height: 38px;
  padding: 0;
  overflow: hidden;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.brand-mascot {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.topbar {
  flex: 0 0 56px;
}

.workspace-layout {
  flex: 1 1 auto;
  height: auto;
  min-height: 0;
}

.bottom-bar {
  flex: 0 0 40px;
}

.sidebar-title-copy {
  min-width: 0;
  flex: 1 1 auto;
}

.panel-header-action {
  margin-left: auto;
}

.feed-toolbar-heading,
.right-panel-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.feed-toolbar-heading > div,
.right-panel-heading > div:last-child {
  min-width: 0;
}

.feed-subtitle {
  margin-left: 0;
}

.wallet-heading-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--accent-subtle);
  color: var(--accent);
}

.feed-profile-link {
  display: block;
  flex: 0 0 38px;
  line-height: 0;
}

/* Keep hover emphasis on the individual card instead of lifting the whole panel. */
.workspace-panel:hover,
.workspace-panel:focus-within {
  transform: none;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-subtle);
  z-index: auto;
}

.workspace-layout:hover .workspace-panel:not(:hover):not(:focus-within) {
  opacity: 1;
}

.feed-card:hover,
.feed-card:focus-within {
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -10px rgba(0, 0, 0, 0.55), 0 0 0 1px var(--accent);
}

.feed-list:hover .feed-card:not(:hover):not(:focus-within) {
  opacity: 1;
  filter: none;
}

.workspace-menu,
.feed-filter-popover {
  position: absolute;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 7px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  box-shadow: var(--shadow-elevated);
}

.workspace-menu {
  top: 50px;
  left: 175px;
  width: 190px;
}

.workspace-menu button,
.feed-filter-popover button {
  min-height: 32px;
  padding: 0 9px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 11px;
}

.workspace-menu button:hover,
.feed-filter-popover button:hover {
  background: var(--accent-subtle);
  color: var(--accent);
}

.feed-toolbar-actions {
  position: relative;
}

.feed-filter-popover {
  top: calc(100% + 7px);
  right: 0;
  width: 180px;
}

.feed-filter-popover strong {
  padding: 4px 8px 5px;
  color: var(--quiet);
  font: 700 9px var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
}

.profile-card,
.chat-card,
.deploys-card,
.help-card {
  width: min(100%, 560px);
  max-height: min(88vh, 820px);
  overflow: hidden;
}

.profile-card .auth-brand,
.chat-card .auth-brand,
.deploys-card .auth-brand,
.help-card .auth-brand {
  margin-bottom: 18px;
}

.profile-form {
  display: grid;
  gap: 12px;
}

.profile-avatar-editor {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-subtle);
}

.profile-avatar-preview,
.chat-avatar {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  overflow: hidden;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  font-weight: 700;
}

.profile-avatar-preview img,
.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-upload {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 11px;
}

.profile-avatar-upload input {
  max-width: 100%;
  margin-top: 4px;
  color: var(--quiet);
  font-size: 10px;
}

.profile-required-note {
  padding: 9px 11px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--accent-subtle);
  color: var(--muted);
  font-size: 11px;
}

.chat-card {
  display: flex;
  flex-direction: column;
  width: min(100%, 780px);
  height: min(82vh, 760px);
}

.chat-feed {
  display: flex;
  flex: 1 1 auto;
  min-height: 120px;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding: 12px 5px;
  border-block: 1px solid var(--line);
}

.chat-message {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.chat-avatar {
  width: 34px;
  height: 34px;
  font-size: 11px;
}

.chat-message-body {
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.chat-message-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 4px;
}

.chat-message-header strong { color: var(--text); font-size: 11px; }
.chat-message-header span,
.chat-message-header time { color: var(--quiet); font: 9px var(--mono); }
.chat-message-body p { margin: 0; color: var(--muted); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; }

.chat-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding-top: 11px;
}

.chat-form textarea {
  min-height: 44px;
  max-height: 120px;
  resize: vertical;
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.deploy-history-list,
.help-content {
  display: grid;
  gap: 9px;
  max-height: 60vh;
  overflow: auto;
}

.deploy-history-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-2);
}

.deploy-history-entry strong,
.deploy-history-entry small { display: block; }
.deploy-history-entry strong { color: var(--text); font-size: 12px; }
.deploy-history-entry small { margin-top: 3px; color: var(--quiet); font: 9px var(--mono); }
.deploy-history-entry a { color: var(--accent); font-size: 10px; text-decoration: none; white-space: nowrap; }
.help-content p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.6; }

.account-profile-avatar img,
.account-chip-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.account-profile-avatar img { position: absolute; inset: 0; }
.account-chip-avatar { position: relative; display: inline-grid; place-items: center; width: 26px; height: 26px; overflow: hidden; border-radius: 50%; background: var(--accent-subtle); color: var(--accent); font-size: 10px; }

@media (max-width: 600px) {
  .workspace-menu { top: 46px; left: 100px; }
  .chat-card { height: min(88vh, 760px); }
  .chat-form { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .app-shell {
    height: auto;
    min-height: 100dvh;
  }

  .workspace-layout {
    flex: 1 0 auto;
  }
}

@media (max-width: 600px) {
  .topbar {
    flex-basis: 52px;
  }

  .workspace-layout {
    flex: 1 0 auto;
  }

  .right-sidebar {
    grid-column: 1;
  }
}

.history-card,
.chat-card,
.help-card {
  width: min(100%, 760px);
  max-height: min(88vh, 820px);
  overflow: hidden;
}

.workspace-layout.chat-closed {
  grid-template-columns: 220px minmax(380px, 1fr) 300px;
}

.workspace-layout.chat-closed #panelChatWidget {
  display: none;
}

.chat-widget {
  display: flex;
  min-width: 0;
  flex-direction: column;
  padding: 0 12px 12px;
}

.chat-widget-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 62px;
  border-bottom: 1px solid var(--line);
}

.chat-widget-heading,
.chat-widget-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.chat-widget-heading > .app-svg { color: var(--accent); }
.chat-widget-heading h2 { margin: 0; color: var(--text); font: 600 13px/1.15 var(--display); }
.chat-widget-heading span { display: flex; align-items: center; gap: 5px; margin-top: 4px; color: var(--quiet); font-size: 9px; }
.chat-widget-heading span i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.chat-widget-actions { gap: 3px; }

.chat-channel-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  border-bottom: 1px solid var(--line);
}

.chat-channel-bar strong { color: var(--text); font-size: 11px; }
.chat-channel-bar span { color: var(--quiet); font-size: 9px; }
.chat-widget .chat-messages { min-height: 0; padding: 10px 2px; border: 0; }
.chat-widget .chat-message { grid-template-columns: 32px minmax(0, 1fr); gap: 8px; }
.chat-widget .chat-avatar { width: 32px; height: 32px; }
.chat-widget .chat-message-content { padding: 7px 8px; }
.chat-widget .chat-message-meta { gap: 5px; }
.chat-widget .chat-message-meta strong { font-size: 10px; }
.chat-widget .chat-message-meta span, .chat-widget .chat-message-meta time { font-size: 8px; }
.chat-widget .chat-message-content p { font-size: 11px; }
.chat-widget .chat-empty { margin: auto; }
.chat-widget .chat-compose { gap: 7px; padding-top: 9px; border-top: 1px solid var(--line); }
.chat-widget .chat-compose textarea { min-height: 42px; max-height: 110px; font-size: 11px; }
.chat-widget .chat-compose-footer { align-items: center; }
.chat-widget .chat-compose-footer > span { max-width: 155px; font-size: 9px; }
.chat-widget .chat-compose-footer .button { min-height: 32px; padding-inline: 10px; font-size: 10px; }

.deploys-widget { padding: 0 12px 12px; }
.deploy-panel-actions { display: flex; gap: 3px; }
.deploy-panel-controls { display: grid; gap: 8px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.deploy-sort { display: flex; align-items: center; justify-content: space-between; min-height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.deploy-sort span { color: var(--muted); font-size: 10px; }
.deploy-sort select { border: 0; outline: 0; background: transparent; color: var(--text); font-size: 10px; }
.deploy-scope-row { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; }
.deploy-scope-row > span:first-child { flex: 1; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.deploy-scope-active { padding: 7px 9px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); color: var(--accent); }
.deploy-panel-list { display: flex; flex: 1 1 auto; min-height: 100px; flex-direction: column; gap: 6px; overflow: auto; padding: 10px 0; }
.deploy-panel-empty { display: grid; flex: 1; place-items: center; padding: 20px 10px; color: var(--quiet); font-size: 11px; text-align: center; }
.deploy-panel-item { display: grid; width: 100%; gap: 5px; padding: 10px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); color: inherit; text-align: left; cursor: pointer; transition: border-color .16s ease, background .16s ease, transform .16s ease; }
.deploy-panel-item:hover, .deploy-panel-item:focus-visible { transform: translateY(-1px); border-color: var(--line-focus); background: var(--accent-subtle); outline: 0; }
.deploy-panel-item strong { display: flex; align-items: center; gap: 5px; overflow: hidden; color: var(--text); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.deploy-panel-item strong span { color: var(--accent); font: 700 9px var(--mono); }
.deploy-panel-item strong i { margin-left: auto; color: var(--accent); font-style: normal; opacity: 0; }
.deploy-panel-item:hover strong i, .deploy-panel-item:focus-visible strong i { opacity: 1; }
.deploy-panel-item small { color: var(--quiet); font: 8px var(--mono); }
.deploy-panel-create { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 36px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface-2); color: var(--muted); font-size: 10px; }
.deploy-panel-create:hover { border-color: var(--accent); color: var(--accent); }

.username-input {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--surface-2);
  color: var(--quiet);
}

.username-input input {
  min-width: 0;
  flex: 1;
  padding: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.chat-card {
  display: flex;
  flex-direction: column;
  height: min(82vh, 760px);
}

.chat-title { margin-bottom: 14px; }
.chat-live-label { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; color: var(--accent); font: 700 9px var(--mono); }
.chat-live-label i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }

.chat-messages {
  display: flex;
  flex: 1 1 auto;
  min-height: 140px;
  flex-direction: column;
  gap: 12px;
  overflow: auto;
  padding: 12px 5px;
  border-block: 1px solid var(--line);
}

.chat-message { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: start; gap: 10px; }
.chat-message-content { min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); }
.chat-message.mine .chat-message-content { border-color: var(--line-strong); background: var(--accent-subtle); }
.chat-message-meta { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.chat-message-meta strong { color: var(--text); font-size: 11px; }
.chat-message-meta span, .chat-message-meta time { color: var(--quiet); font: 9px var(--mono); }
.chat-message-meta time { margin-left: auto; }
.chat-message-content p { margin: 0; color: var(--muted); font-size: 12px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.5; }

.chat-compose { display: grid; gap: 8px; padding-top: 11px; }
.chat-compose textarea { width: 100%; min-height: 50px; max-height: 130px; resize: vertical; padding: 10px; border: 1px solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-2); color: var(--text); font: inherit; }
.chat-compose-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.chat-compose-footer > span { color: var(--quiet); font-size: 10px; }

.history-list { display: grid; gap: 9px; max-height: 58vh; overflow: auto; }
.history-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 11px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); }
.history-item-mark { display: grid; place-items: center; width: 32px; height: 32px; border: 1px solid var(--line-strong); border-radius: 10px; color: var(--accent); }
.history-item-copy { min-width: 0; }
.history-item-copy strong, .history-item-copy small, .history-item-copy code { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.history-item-copy strong { color: var(--text); font-size: 12px; }
.history-item-copy strong span { color: var(--accent); font-family: var(--mono); }
.history-item-copy small { margin-top: 3px; color: var(--quiet); font-size: 10px; }
.history-item-copy code { margin-top: 4px; color: var(--quiet); font: 9px var(--mono); }
.history-item-links { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; }
.history-item-links a { color: var(--accent); font-size: 10px; text-decoration: none; white-space: nowrap; }
.history-item-links a:hover { text-decoration: underline; }
.history-loading, .history-error { padding: 18px; color: var(--muted); font-size: 12px; }
.history-error { color: var(--danger, #ff7b7b); }
.history-empty, .chat-empty { display: grid; justify-items: center; gap: 8px; padding: 26px 14px; color: var(--muted); text-align: center; }
.history-empty strong, .chat-empty strong { color: var(--text); font-size: 13px; }
.history-empty p, .chat-empty p { margin: 0; color: var(--quiet); font-size: 11px; }
.history-empty .button { margin-top: 5px; }

.wallet-deploy-history { display: grid; gap: 5px; }
.wallet-deploy-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); text-decoration: none; }
.wallet-deploy-row:hover { border-color: var(--line-strong); background: var(--surface-2); }
.wallet-deploy-row strong, .wallet-deploy-row small { display: block; }
.wallet-deploy-row strong { color: var(--text); font-size: 10px; }
.wallet-deploy-row small { margin-top: 3px; color: var(--quiet); font: 8px var(--mono); }
.wallet-deploy-row > span:last-child { color: var(--accent); }

.help-list { display: grid; gap: 9px; max-height: 58vh; overflow: auto; }
.help-list > div { display: grid; gap: 4px; padding: 11px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface-2); }
.help-list strong { color: var(--text); font-size: 12px; }
.help-list span { color: var(--muted); font-size: 11px; line-height: 1.55; }
.help-done { margin-top: 13px; }

.top-wallet-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 44px;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  color: var(--text);
}

.top-wallet-button:hover,
.profile-avatar-trigger:hover { border-color: var(--accent); background: var(--accent-subtle); }
.top-wallet-button > .app-svg { color: var(--muted); width: 15px; height: 15px; }
.top-wallet-value { display: inline-flex; align-items: baseline; gap: 4px; color: var(--text); font: 600 10px var(--mono); }
.top-wallet-value small { color: var(--quiet); font-size: 8px; }
.wallet-lock-hint { color: var(--quiet); font: 9px var(--mono); }
.top-wallet-chevron, .profile-avatar-trigger-chevron { color: var(--quiet); font-size: 10px; }

.profile-avatar-trigger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 38px;
  padding: 3px 5px 3px 3px;
  border: 1px solid var(--line-strong);
  border-radius: 22px;
  background: var(--surface-2);
}

.profile-avatar-trigger-image {
  position: relative;
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.profile-avatar-trigger-image img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.topbar .top-wallet-button { height: 34px; }
.topbar .profile-avatar-trigger { height: 36px; }
.account-menu-meta { padding: 1px 7px 8px; border-bottom: 1px solid var(--line); color: var(--quiet); font-size: 10px; overflow-wrap: anywhere; }
.account-menu .account-menu-icon { display: inline-grid; width: 18px; place-items: center; color: var(--quiet); font-size: 14px; }
.account-menu-separator { height: 1px; margin: 3px 2px; background: var(--line); }
.wallet-popover-network { display: flex; align-items: center; gap: 6px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--muted); font-size: 10px; }
.wallet-popover-network .network-live-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.wallet-popover-network small { margin-left: auto; color: var(--quiet); font: 9px var(--mono); }
.wallet-popover .wallet-safety-note { margin: 8px 0 0; font-size: 9px; }

@media (max-width: 1180px) {
  .workspace-layout.chat-closed { grid-template-columns: 170px minmax(280px, 1fr) 230px; }
}

@media (max-width: 900px) {
  .workspace-layout.chat-closed { grid-template-columns: 58px minmax(0, 1fr); }
  .workspace-layout.chat-closed .right-sidebar { grid-column: 2; }
  .workspace-layout.chat-closed .chat-widget { display: none; }
}

@media (max-width: 600px) {
  .chat-compose-footer { align-items: stretch; flex-direction: column; }
  .history-item { grid-template-columns: 30px minmax(0, 1fr); }
  .history-item-links { grid-column: 2; flex-direction: row; align-items: center; }
}

/* AI assisted token naming and image creation */
.deploy-ai-suggestions { display: grid; gap: 8px; padding: 11px; border: 1px solid rgba(65, 213, 160, .2); border-radius: 10px; background: rgba(33, 142, 106, .055); }
.deploy-ai-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.deploy-ai-heading > span { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font: 700 9px var(--mono); letter-spacing: .06em; }
.deploy-ai-heading .app-svg { width: 14px; height: 14px; }
.deploy-ai-heading > small { color: var(--quiet); font-size: 9px; text-align: right; }
.deploy-ai-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.deploy-ai-option { display: grid; grid-template-columns: 1fr auto; gap: 3px 8px; min-width: 0; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text); text-align: left; cursor: pointer; }
.deploy-ai-option:hover, .deploy-ai-option.selected { border-color: rgba(65, 213, 160, .55); background: rgba(33, 142, 106, .12); }
.deploy-ai-option strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.deploy-ai-option > span { color: var(--accent); font: 700 9px var(--mono); }
.deploy-ai-option small { grid-column: 1 / -1; overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.ai-image-overlay { z-index: 230; }
.ai-image-card { display: flex; flex-direction: column; width: min(900px, 100%); max-height: calc(100dvh - 48px); padding: 0; overflow: hidden; background: var(--surface); }
.ai-image-header { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.ai-image-header > div { display: flex; align-items: center; gap: 10px; }
.ai-image-header strong, .ai-image-header small { display: block; }
.ai-image-header strong { color: var(--text); font: 700 15px "Space Grotesk", sans-serif; }
.ai-image-header small { margin-top: 3px; color: var(--quiet); font: 8px var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.ai-image-mark { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid rgba(61, 223, 165, .28); border-radius: 10px; background: rgba(35, 180, 125, .1); color: var(--accent); }
.ai-image-mark .app-svg { width: 17px; height: 17px; }
.ai-image-close { color: var(--muted); font-size: 21px; }
.ai-image-body { display: grid; grid-template-columns: 190px minmax(0, 1fr); min-height: 0; overflow: auto; }
.ai-image-source-column { display: flex; flex-direction: column; gap: 10px; padding: 15px; border-right: 1px solid var(--line); }
.ai-image-section-label { display: flex; align-items: center; justify-content: space-between; color: var(--quiet); font: 700 8px var(--mono); letter-spacing: .06em; }
.ai-image-section-label small { color: var(--accent); }
.ai-image-sources { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.ai-image-source { display: grid; place-items: center; aspect-ratio: 1; padding: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--accent); cursor: pointer; }
.ai-image-source:hover, .ai-image-source.selected { border-color: var(--accent); box-shadow: 0 0 0 1px rgba(61, 223, 165, .18); }
.ai-image-source img { width: 100%; height: 100%; object-fit: cover; }
.ai-image-source-new { font-size: 22px; }
.ai-image-upload, .ai-image-new { display: flex; align-items: center; justify-content: center; gap: 7px; min-height: 35px; padding: 7px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--muted); font-size: 9px; cursor: pointer; }
.ai-image-upload:hover, .ai-image-new:hover { border-color: var(--line-strong); color: var(--accent); }
.ai-image-upload .app-svg { width: 14px; height: 14px; }
.ai-image-upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.ai-image-workspace { display: flex; min-width: 0; flex-direction: column; gap: 11px; padding: 16px; }
.ai-image-canvas { display: grid; place-items: center; min-height: 220px; max-height: min(48vh, 450px); aspect-ratio: 1.5; overflow: hidden; border: 1px dashed var(--line-strong); border-radius: 10px; background: radial-gradient(ellipse at center, rgba(46, 172, 125, .07), transparent 65%), var(--bg); color: var(--quiet); font-size: 10px; text-align: center; }
.ai-image-canvas img { display: block; width: 100%; height: 100%; object-fit: contain; }
.ai-image-canvas.is-generating { position: relative; isolation: isolate; }
.ai-image-loading { position: absolute; inset: 0; z-index: 2; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 16px; overflow: hidden; background: radial-gradient(ellipse at 50% 42%, rgba(34, 197, 143, .16), rgba(9, 19, 15, .92) 64%); }
.ai-image-loading-orb { position: relative; display: grid; width: 142px; height: 142px; place-items: center; }
.ai-image-loading-orb::before, .ai-image-loading-orb::after { position: absolute; inset: 8px; border: 1px solid rgba(57, 220, 163, .17); border-radius: 50%; content: ""; animation: ai-image-orbit 9s linear infinite; }
.ai-image-loading-orb::after { inset: 21px; border-color: rgba(87, 244, 190, .25); border-style: dashed; animation-direction: reverse; animation-duration: 13s; }
.ai-image-loading-orb > i { position: absolute; width: 30px; height: 30px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(221, 255, 245, .95), rgba(48, 229, 165, .72) 38%, rgba(22, 170, 123, .2) 72%); filter: blur(7px); opacity: .9; animation: ai-image-drift 3.8s ease-in-out infinite alternate; }
.ai-image-loading-orb > i:nth-child(1) { top: 6px; left: 49px; }
.ai-image-loading-orb > i:nth-child(2) { top: 49px; right: 1px; width: 24px; height: 24px; animation-delay: -.8s; }
.ai-image-loading-orb > i:nth-child(3) { bottom: 5px; left: 36px; width: 38px; height: 38px; animation-delay: -1.7s; }
.ai-image-loading-orb > i:nth-child(4) { top: 47px; left: 2px; width: 21px; height: 21px; animation-delay: -2.5s; }
.ai-image-loading-percent { position: relative; z-index: 1; color: var(--text); font-size: 27px; font-weight: 800; letter-spacing: -.06em; text-shadow: 0 0 24px rgba(47, 229, 165, .42); }
.ai-image-loading-track { width: min(68%, 280px); height: 4px; overflow: hidden; border-radius: 99px; background: rgba(255, 255, 255, .1); box-shadow: 0 0 16px rgba(47, 229, 165, .08); }
.ai-image-loading-track > i { display: block; width: 0; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #159c70, #55f2b7); box-shadow: 0 0 14px rgba(47, 229, 165, .65); transition: width .25s ease; }
.ai-image-loading-copy { color: var(--muted); font-size: 11px; letter-spacing: .015em; animation: ai-image-copy-glow 2.4s ease-in-out infinite; }
@keyframes ai-image-orbit { to { transform: rotate(360deg); } }
@keyframes ai-image-drift { from { transform: translate3d(-9px, 5px, 0) scale(.8); opacity: .48; } to { transform: translate3d(9px, -7px, 0) scale(1.25); opacity: 1; } }
@keyframes ai-image-copy-glow { 50% { color: var(--text); text-shadow: 0 0 14px rgba(47, 229, 165, .35); } }
@media (prefers-reduced-motion: reduce) { .ai-image-loading-orb::before, .ai-image-loading-orb::after, .ai-image-loading-orb > i, .ai-image-loading-copy { animation-duration: 10s; } }
.ai-image-prompt { display: grid; gap: 6px; }
.ai-image-prompt > span { color: var(--quiet); font: 700 8px var(--mono); letter-spacing: .07em; }
.ai-image-prompt textarea { width: 100%; min-height: 84px; resize: vertical; padding: 10px 11px; border: 1px solid var(--line-strong); border-radius: 9px; outline: 0; background: var(--surface-2); color: var(--text); font: 11px/1.5 "DM Sans", sans-serif; }
.ai-image-prompt textarea:focus { border-color: var(--accent); }
.ai-image-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ai-image-actions p { margin: 0; color: var(--muted); font-size: 9px; }
.ai-image-actions button { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px; white-space: nowrap; }
.ai-image-actions button .app-svg { width: 14px; height: 14px; }
.ai-image-actions button:disabled { opacity: .65; cursor: wait; }
.ai-image-use { align-self: flex-end; min-height: 34px; padding: 0 12px; }
.ai-image-use[hidden] { display: none; }
@media (max-width: 680px) {
  .feed-ai-image-button { opacity: 1; transform: none; }
  .ai-image-card { max-height: calc(100dvh - 20px); }
  .ai-image-body { grid-template-columns: 1fr; }
  .ai-image-source-column { gap: 7px; padding: 10px 12px; border-right: 0; border-bottom: 1px solid var(--line); }
  .ai-image-sources { display: flex; overflow-x: auto; }
  .ai-image-source { width: 58px; height: 58px; flex: 0 0 58px; }
  .ai-image-upload, .ai-image-new { min-height: 30px; }
  .ai-image-workspace { padding: 12px; }
  .ai-image-canvas { min-height: 150px; }
  .ai-image-actions { align-items: stretch; flex-direction: column; }
  .ai-image-actions button { justify-content: center; }
  .deploy-ai-options { grid-template-columns: 1fr; }
}

.feed-catchup { position: sticky; top: 0; z-index: 3; display: block; margin: 0 auto .65rem; padding: .35rem .8rem; border: 1px solid var(--accent); border-radius: 1rem; background: var(--surface, #151d19); color: var(--accent); cursor: pointer; }

.deploy-token-icon { width: 34px; height: 34px; display: grid; place-items: center; overflow: hidden; border-radius: 8px; float: left; margin-right: 9px; background: var(--surface-2, #253c32); color: var(--accent); font-weight: 700; }
.deploy-token-icon img { width: 100%; height: 100%; object-fit: cover; }
.token-market-no-chart .token-market-chart-card { display: none; }
.tracker-dialog { color: var(--text, #edf8f1); background: var(--surface, #151d19); width: min(94vw, 540px); }
.tracker-dialog::backdrop { background: #0009; }
.tracker-dialog [data-tracker-accounts] { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.manage-page { max-width: 880px; margin: 2rem auto; padding: 0 1rem; }
.manage-page article { padding: 1rem; border: 1px solid var(--border, #485950); border-radius: 10px; margin: .75rem 0; }
.manage-page input, .manage-page button { margin: .4rem; padding: .4rem; }

.deploy-panel-item { grid-template-columns: 34px minmax(0, 1fr); column-gap: 9px; }
.deploy-panel-item .deploy-token-icon { grid-row: span 2; margin: 0; float: none; }

.management-body { min-height: 100vh; height: auto; overflow: auto; background: #0c1411; color: #edf7f1; font: 15px/1.5 system-ui, sans-serif; }
.management-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px max(20px, calc((100vw - 1120px)/2)); border-bottom: 1px solid #294239; background: #101b16; }
.management-bar a { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; white-space: nowrap; }
.management-bar img { width: 32px; height: 32px; object-fit: contain; }
.management-shell { max-width: 1120px; }
.management-shell h1 { font-size: clamp(28px, 4vw, 42px); }
.management-shell h2 { margin: 22px 0 12px; font-size: 20px; }
.management-shell h3 { margin: 0; font-size: 17px; }
.management-shell p { color: #b5cbc0; overflow-wrap: anywhere; }
.management-shell a { color: #90e8bd; }
.management-shell #manage-status:not(:empty) { border-left: 3px solid #6ce1aa; padding: 8px 12px; background: #182b22; }
.management-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 14px; }
.management-shell .management-card { border: 1px solid #2e493d; border-radius: 14px; padding: 18px; margin: 0; background: #14221b; overflow-wrap: anywhere; }
.management-shell .management-login { max-width: 420px; margin: 28px auto; }
.management-metric strong { display: block; font-size: 27px; }
.management-metric span { color: #b5cbc0; }
.management-shell .management-pill { display: inline-block; border-radius: 99px; padding: 3px 10px; color: #99e6c1; background: #213d31; }
.management-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 12px; margin: 0 0 14px; }
.management-shell label { display: grid; gap: 5px; margin: 10px 0; color: #c7ded1; }
.management-shell input, .management-shell select, .management-shell textarea { width: 100%; min-width: 0; margin: 0; padding: 9px 11px; border: 1px solid #416253; border-radius: 8px; color: #edf7f1; background: #101b16; font: inherit; }
.management-shell button, .management-bar button { margin: 8px 8px 0 0; padding: 8px 13px; border: 1px solid #46735d; border-radius: 8px; background: #254737; color: #effff4; font: inherit; cursor: pointer; }
.management-shell button:disabled { opacity: .55; cursor: wait; }
.management-shell details { margin-top: 12px; }
.management-shell details a { display: block; }
.management-shell summary { cursor: pointer; }
.management-shell form.management-card:not(.management-login), .management-shell .management-link { margin-top: 18px; }
.management-shell :focus-visible, .management-bar :focus-visible { outline: 2px solid #83edb6; outline-offset: 3px; }


.management-body { background: radial-gradient(ellipse at 75% 0%, #19362c 0, transparent 45%), #0a1210; }
.management-shell { padding-bottom: 48px; }
.management-shell h1 { letter-spacing: -.045em; margin-bottom: 4px; }
.management-intro { margin: 0 0 20px; }
.management-overview { margin: 18px 0; }
.management-shell .management-metric { background: linear-gradient(150deg, #20372e, #13241e 75%); border-top-color: #527263; }
.management-metric strong { font-variant-numeric: tabular-nums; margin-top: 4px; color: #b6f6d6; }
.management-demo-banner { margin: 14px 0; border: 1px solid #9b7847; border-radius: 14px; padding: 16px 18px; background: #30271a; }
.management-demo-banner strong { color: #ffd597; font-size: 12px; letter-spacing: .12em; }
.management-demo-banner p { margin: 5px 0 0; color: #f2dfbc; }
.management-directory { margin-top: 24px; }
.management-directory > label { max-width: 430px; margin-bottom: 18px; }
.management-record-id { color: #96d8bb; font: 600 12px ui-monospace, monospace; }
.management-record h3 { margin-top: 9px; }
.management-record dl { margin: 12px 0 0; }
.management-record dt { margin-top: 9px; color: #b5cbc0; font-size: 12px; }
.management-record dd { margin: 0; }
.management-shell summary { color: #b6f6d6; }


.management-body { --mg-accent: #7fe9b7; --mg-edge: #304a3f; --mg-panel: #14231d; }
.management-body[data-management="demo"] { --mg-accent: #f1c580; --mg-edge: #574831; --mg-panel: #231e17; background: radial-gradient(ellipse at 76% 0, #3e301c, transparent 48%), #14110d; }
.management-body[data-management="demo"] .management-bar { background: #201a13; border-color: var(--mg-edge); }
.management-heading { padding: clamp(20px, 5vw, 46px) clamp(18px, 4vw, 38px); border: 1px solid var(--mg-edge); border-radius: 20px; background: linear-gradient(125deg, var(--mg-panel), transparent); }
.management-heading h1 { margin: 0; font-size: clamp(32px, 6vw, 56px); line-height: 1.12; }
.management-heading p { margin: 10px 0 0; }
.management-heading p:empty { display: none; }
.management-shell .management-metric { position: relative; overflow: hidden; border-color: var(--mg-edge); background: var(--mg-panel); }
.management-metric::after { content: ""; position: absolute; width: 80px; height: 80px; right: -27px; top: -29px; border: 1px solid var(--mg-accent); border-radius: 50%; opacity: .3; }
.management-metric strong, .management-shell a { color: var(--mg-accent); }
.management-section-nav { display: flex; gap: 5px; flex-wrap: wrap; padding: 5px; margin: 24px 0 16px; width: fit-content; border-radius: 12px; background: #101b16; border: 1px solid var(--mg-edge); }
.management-shell .management-section-nav button { margin: 0; background: transparent; border-color: transparent; }
.management-shell .management-section-nav button[aria-pressed="true"] { background: #224335; border-color: #48745e; color: #c5ffe3; }
.management-view { border: 1px solid var(--mg-edge); background: #101b16; border-radius: 16px; padding: clamp(13px, 3vw, 22px); }
.management-view > h2, .management-view form h2 { margin-top: 0; }
.management-shell .management-view form.management-card { margin: 0; }
.management-table-wrap { overflow-x: auto; }
.management-table { min-width: 660px; width: 100%; border-collapse: collapse; text-align: left; }
.management-table th, .management-table td { padding: 12px; border-bottom: 1px solid var(--mg-edge); white-space: nowrap; }
.management-table th { color: #b5cbc0; background: var(--mg-panel); font-size: 12px; }
.management-table tr:hover td { background: #172921; }
.management-body[data-management="demo"] .management-record { background: var(--mg-panel); border-color: var(--mg-edge); }
.management-body[data-management="demo"] .management-record-id, .management-body[data-management="demo"] summary { color: var(--mg-accent); }
.management-body[data-management="demo"] .management-shell button { background: #42341f; border-color: #806239; }
.management-body[data-management="demo"] .management-record dd { padding-bottom: 7px; border-bottom: 1px solid var(--mg-edge); }
.management-toolbar input[type="search"] { width: min(100%, 290px); }
.management-toolbar label { margin: 0; }
.management-toolbar button { align-self: end; margin: 0; }
@media (max-width: 540px) { .management-bar { padding: 10px 12px; } .management-bar button { margin: 0 0 0 4px; } .management-toolbar { align-items: stretch; flex-direction: column; } .management-toolbar button { align-self: start; } }



/* Keep all workspace actions reachable across viewport sizes. */
@media (min-width: 901px) and (max-width: 1240px) {
  .workspace-layout { grid-template-columns: 160px minmax(0, 1fr) 205px 220px; }
  .workspace-layout.chat-closed { grid-template-columns: 160px minmax(0, 1fr) 245px; }
  .top-search { width: clamp(132px, 17vw, 245px); }
}

@media (max-width: 900px) {
  .topbar { position: relative; flex: 0 0 auto; height: auto; min-height: 56px; flex-wrap: wrap; padding: 8px 12px; gap: 6px; }
  .topbar .workspace-switch, .topbar .top-actions, .topbar .top-actions .top-action { display: inline-flex; }
  .topbar-spacer { display: none; }
  .top-search { order: 1; flex: 1 0 100%; width: 100%; min-width: 0; margin: 0; }
  .topbar .account-root { margin-left: auto; min-width: 0; }
  .workspace-layout, .workspace-layout.chat-closed { grid-template-columns: minmax(0, 1fr); min-height: 0; padding: 8px; }
  .workspace-layout > .workspace-panel { grid-column: 1; }
  .workspace-layout > .left-sidebar { display: none; }
  .workspace-layout > .feed-column { order: -1; }
  .workspace-layout .feed-scroll { max-height: min(70dvh, 680px); min-height: 12rem; }
  .workspace-layout .right-sidebar { min-height: 260px; max-height: min(62dvh, 560px); }
  .workspace-layout .chat-widget { min-height: 390px; height: min(62dvh, 560px); }
  .workspace-layout .panel-drag-handle { display: none; }
  .bottom-bar { flex: 0 0 auto; height: auto; flex-wrap: wrap; gap: 5px; padding: 6px 8px; }
  .bottom-left, .bottom-right { flex-wrap: wrap; }
  .bottom-left { flex: 1 0 100%; }
  .bottom-tab, .bottom-icon, .top-action, .workspace-switch { min-height: 36px; }
  .auth-overlay, .wallet-trade-overlay, .token-market-overlay { padding: clamp(6px, 2vw, 14px); }
  .auth-overlay > .auth-card:not(.ai-image-card), .wallet-trade-overlay > section {
    max-width: 100%;
    max-height: calc(100dvh - 2 * clamp(6px, 2vw, 14px));
    overflow: auto;
    overscroll-behavior: contain;
  }
}

@media (max-width: 600px) {
  .topbar { padding-inline: 8px; }
  .topbar .brand-name, .topbar .workspace-switch > span, .topbar .top-action > span { display: none; }
  .topbar .workspace-switch, .topbar .top-action { min-width: 36px; justify-content: center; margin: 0; padding: 0 6px; }
  .topbar .top-actions { gap: 4px; }
  .topbar .workspace-menu { left: 8px; top: 48px; max-width: calc(100vw - 16px); }
  .topbar .wallet-popover { right: 0; width: min(310px, calc(100vw - 16px)); }
  .account-menu, .wallet-popover, .workspace-menu { max-height: 70dvh; overflow-y: auto; }
  .feed-column .feed-toolbar, .feed-column .feed-filter-row, .feed-card-footer { flex-wrap: wrap; }
  .feed-card-header > *, .feed-card-actions, .feed-account-meta { min-width: 0; }
  .feed-card-actions { flex-wrap: wrap; }
  .feed-content, .chat-message-body, .deploy-panel-item { overflow-wrap: anywhere; }
  .auth-overlay > .auth-card:not(.ai-image-card) { padding-inline: clamp(12px, 4vw, 24px); }
  .auth-form input:not([type="checkbox"]), .auth-form textarea, .auth-form select, .top-search input,
  .tracker-dialog input, .tracker-dialog textarea, .management-shell input, .management-shell select, .management-shell textarea { font-size: 16px; }
  .deploy-platform-row, .deploy-buy-presets, .history-item-links { flex-wrap: wrap; }
  .token-market-layout .token-market-side { order: -1; }
  .management-shell { padding-inline: 12px; }
}
@media (max-width: 420px) {
  .deploy-fields-grid { grid-template-columns: minmax(0, 1fr); }
  .management-bar { flex-wrap: wrap; }
  .management-table-wrap { max-width: 100%; }
}


.wallet-utility-dialog { margin: auto; max-width: calc(100vw - 24px); max-height: calc(100dvh - 24px); overflow: auto; background: var(--surface); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--radius-lg); }
.wallet-utility-dialog::backdrop { background: #030805b8; }
.wallet-utility-dialog > h1 { padding-right: 28px; }
.wallet-utility-dialog p, .wallet-utility-dialog textarea { overflow-wrap: anywhere; }
.wallet-utility-dialog [data-reveal] { margin-top: 14px; }
.wallet-utility-dialog [data-status] a { color: var(--accent); }

