:root {
  color-scheme: dark;
  --bg: #060607;
  --bg-soft: #0a0a0c;
  --surface: rgba(20, 20, 23, 0.86);
  --surface-strong: #151518;
  --surface-muted: #101012;
  --line: rgba(255, 255, 255, 0.075);
  --line-gold: rgba(225, 184, 78, 0.25);
  --text: #f6f4ef;
  --muted: #908f95;
  --muted-bright: #b7b4ad;
  --gold: #e1b84e;
  --gold-bright: #f6d477;
  --gold-dim: #8c6b21;
  --green: #39d69f;
  --green-soft: rgba(57, 214, 159, 0.12);
  --red: #ff5e6c;
  --red-soft: rgba(255, 94, 108, 0.12);
  --blue: #559cff;
  --violet: #8f7cff;
  --nav-height: 76px;
  --safe-top: max(
    env(safe-area-inset-top, 0px),
    var(--tg-safe-area-inset-top, 0px),
    var(--tg-content-safe-area-inset-top, 0px),
    var(--mc-telegram-safe-top, 0px),
    var(--mc-telegram-content-top, 0px),
    8px
  );
  --safe-right: max(
    env(safe-area-inset-right, 0px),
    var(--tg-safe-area-inset-right, 0px),
    var(--tg-content-safe-area-inset-right, 0px),
    var(--mc-telegram-safe-right, 0px),
    var(--mc-telegram-content-right, 0px)
  );
  --safe-bottom: max(
    env(safe-area-inset-bottom, 0px),
    var(--tg-safe-area-inset-bottom, 0px),
    var(--tg-content-safe-area-inset-bottom, 0px),
    var(--mc-telegram-safe-bottom, 0px),
    var(--mc-telegram-content-bottom, 0px),
    8px
  );
  --safe-left: max(
    env(safe-area-inset-left, 0px),
    var(--tg-safe-area-inset-left, 0px),
    var(--tg-content-safe-area-inset-left, 0px),
    var(--mc-telegram-safe-left, 0px),
    var(--mc-telegram-content-left, 0px)
  );
  --radius-xl: 26px;
  --radius-lg: 20px;
  --radius-md: 15px;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.36);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display",
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  min-height: 100%;
  background: var(--bg);
  overscroll-behavior: none;
}

body {
  min-width: 280px;
  min-height: var(--mc-viewport-height, 100dvh);
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 100% -5%, rgba(225, 184, 78, 0.1), transparent 31rem),
    radial-gradient(circle at -10% 35%, rgba(78, 84, 189, 0.08), transparent 29rem),
    var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  font-variant-numeric: tabular-nums;
  line-height: 1.4;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  border: 0;
  cursor: pointer;
}

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

input {
  min-width: 0;
}

img {
  display: block;
  max-width: 100%;
}

.boot-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 50% 40%, rgba(225, 184, 78, 0.09), transparent 18rem),
    #060607;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid rgba(246, 212, 119, 0.55);
  border-radius: 14px;
  background: linear-gradient(145deg, #242016, #0d0c0a);
  box-shadow: inset 0 0 20px rgba(225, 184, 78, 0.08), 0 8px 30px rgba(0, 0, 0, 0.5);
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-mark::after {
  position: absolute;
  inset: 5px;
  border: 1px solid rgba(246, 212, 119, 0.18);
  border-radius: 9px;
  content: "";
}

.boot-mark {
  width: 66px;
  height: 66px;
  margin-bottom: 22px;
  border-radius: 21px;
  font-size: 17px;
}

.boot-title {
  font-size: 20px;
  font-weight: 850;
  letter-spacing: 0.17em;
}

.boot-subtitle {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.07em;
}

.boot-line {
  width: 110px;
  height: 2px;
  margin-top: 28px;
  overflow: hidden;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.06);
}

.boot-line i {
  display: block;
  width: 45%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  animation: boot 1.15s ease-in-out infinite;
}

@keyframes boot {
  from { transform: translateX(-110%); }
  to { transform: translateX(250%); }
}

.app-shell {
  width: min(100%, 760px);
  min-height: var(--mc-viewport-height, 100dvh);
  margin: 0 auto;
  padding:
    var(--safe-top)
    calc(14px + var(--safe-right))
    calc(var(--nav-height) + var(--safe-bottom) + 22px)
    calc(14px + var(--safe-left));
}

.telegram-fullscreen body {
  background-color: #0f1014;
}

html.telegram-fullscreen {
  --safe-top: max(
    env(safe-area-inset-top, 0px),
    var(--tg-safe-area-inset-top, 0px),
    var(--tg-content-safe-area-inset-top, 0px),
    var(--mc-telegram-safe-top, 0px),
    var(--mc-telegram-content-top, 0px),
    var(--mc-native-header-clearance, 84px)
  );
}

/* Telegram owns the native close/back/menu row. The app header starts after
   the reported content inset and remains available for status and refresh. */
html.telegram-fullscreen .topbar {
  display: flex;
  top: var(--mc-native-header-clearance, 84px);
  min-height: 50px;
}

.topbar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 58px;
  gap: 12px;
}

.brand {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.brand-copy {
  min-width: 0;
}

.brand-name {
  overflow: hidden;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-mode {
  margin-top: 1px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.icon-button {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(18, 18, 21, 0.8);
}

.icon-button svg {
  width: 19px;
  height: 19px;
}

.page {
  animation: page-in 180ms ease both;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.eyebrow {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.page-heading {
  margin: 14px 2px 16px;
}

.page-heading h1 {
  margin: 3px 0 0;
  font-size: clamp(25px, 7vw, 34px);
  font-weight: 820;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.page-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(145deg, rgba(28, 28, 32, 0.86), rgba(14, 14, 16, 0.88));
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 22px;
  border-color: var(--line-gold);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 92% 8%, rgba(225, 184, 78, 0.15), transparent 13rem),
    linear-gradient(145deg, rgba(30, 28, 23, 0.94), rgba(12, 12, 14, 0.94));
}

.hero-card::after {
  position: absolute;
  right: -55px;
  bottom: -80px;
  width: 180px;
  height: 180px;
  border: 1px solid rgba(225, 184, 78, 0.09);
  border-radius: 50%;
  box-shadow: 0 0 0 22px rgba(225, 184, 78, 0.025), 0 0 0 46px rgba(225, 184, 78, 0.018);
  content: "";
}

.hero-label {
  color: var(--muted-bright);
  font-size: 12px;
  font-weight: 650;
}

.hero-value {
  position: relative;
  z-index: 1;
  max-width: 100%;
  margin-top: 5px;
  overflow-wrap: anywhere;
  font-size: clamp(30px, 9vw, 43px);
  font-weight: 800;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.hero-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px 13px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }
.neutral { color: var(--muted-bright) !important; }

.pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-bright);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
}

.pill i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px currentColor;
}

.pill.warning i { background: var(--gold); }
.pill.danger i { background: var(--red); }

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

.metric {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(16, 16, 18, 0.72);
}

.metric-label {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric-value {
  margin-top: 4px;
  overflow: hidden;
  font-size: 16px;
  font-weight: 760;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.section {
  margin-top: 23px;
}

.section-head {
  display: flex;
  min-height: 30px;
  align-items: end;
  justify-content: space-between;
  gap: 10px;
  margin: 0 3px 11px;
}

.section-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 780;
  letter-spacing: -0.025em;
}

.section-head button,
.text-button {
  padding: 2px 0;
  background: none;
  color: var(--gold);
  font-size: 12px;
  font-weight: 700;
}

.search {
  position: relative;
  margin: 17px 0;
}

.search svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.search input {
  width: 100%;
  height: 48px;
  padding: 0 14px 0 43px;
  outline: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(17, 17, 20, 0.82);
  color: var(--text);
  appearance: none;
}

.search input:focus {
  border-color: rgba(225, 184, 78, 0.4);
  box-shadow: 0 0 0 3px rgba(225, 184, 78, 0.06);
}

.asset-list {
  display: grid;
  gap: 8px;
}

.asset-row {
  display: grid;
  width: 100%;
  grid-template-columns: auto minmax(72px, 1fr) minmax(60px, 88px) minmax(85px, auto);
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: linear-gradient(140deg, rgba(22, 22, 25, 0.82), rgba(13, 13, 15, 0.85));
  text-align: left;
}

.asset-row:active {
  transform: scale(0.992);
}

.asset-icon {
  position: relative;
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 14px;
  background: radial-gradient(circle at 30% 20%, rgba(255, 216, 92, 0.16), transparent 56%), rgba(255, 255, 255, 0.035);
}

.asset-icon-fallback {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 228, 150, 0.92);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.asset-icon img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.asset-name {
  display: block;
  overflow: hidden;
  font-size: 14px;
  font-weight: 740;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-symbol,
.subtle {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 620;
}

.asset-symbol { display: block; }

.spark {
  width: 100%;
  height: 34px;
}

.asset-price {
  min-width: 0;
  text-align: right;
}

.asset-price small {
  display: block;
  margin-bottom: 2px;
  color: var(--muted);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: .015em;
  white-space: nowrap;
}

.asset-price strong {
  display: block;
  overflow: hidden;
  font-size: 13px;
  font-weight: 730;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-price > span {
  display: block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
}

.movers {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 1px 1px 6px;
}

.mover {
  min-width: 0;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
}

.mover-top {
  display: flex;
  align-items: center;
  gap: 9px;
}

.mover .asset-icon {
  width: 31px;
  height: 31px;
  border-radius: 10px;
}

.mover strong {
  display: block;
  margin-top: 14px;
  font-size: 17px;
}

.news-list {
  display: grid;
  gap: 9px;
}

.news-card {
  padding: 17px;
}

.news-label {
  color: var(--violet);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.news-card h3 {
  margin: 7px 0 5px;
  font-size: 15px;
}

.news-card p {
  margin: 0;
  color: var(--muted-bright);
  font-size: 12px;
}

/* Temporary fun block at the very bottom of the Market tab. */
.market-bottom-meme {
  width: 100%;
  max-width: 560px;
  margin: 14px auto 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.025);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
}

.market-bottom-meme img {
  display: block;
  width: 100%;
  height: auto;
}

.empty {
  padding: 30px 20px;
  border: 1px dashed rgba(255, 255, 255, 0.12);
  border-radius: 19px;
  color: var(--muted);
  text-align: center;
}

.empty-icon {
  display: grid;
  width: 42px;
  height: 42px;
  margin: 0 auto 10px;
  place-items: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.035);
  color: var(--gold);
}

.action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 13px;
}

.button {
  display: inline-flex;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(25, 25, 28, 0.9);
  color: var(--text);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.15;
}

.button.primary {
  border-color: rgba(225, 184, 78, 0.55);
  background: linear-gradient(145deg, #f2ca66, #b68522);
  box-shadow: 0 10px 30px rgba(170, 120, 23, 0.15);
  color: #171006;
}

.button.success {
  border-color: rgba(57, 214, 159, 0.45);
  background: linear-gradient(145deg, #44dba8, #17865f);
  color: #06150f;
}

.button.danger {
  border-color: rgba(255, 94, 108, 0.4);
  background: linear-gradient(145deg, #ff6976, #a62d3b);
  color: #190608;
}

.button.ghost {
  background: rgba(255, 255, 255, 0.025);
}

.button.block { width: 100%; }

.wallet-card {
  padding: 18px;
}

.wallet-balance {
  font-size: 29px;
  font-weight: 800;
  letter-spacing: -0.045em;
}

.position-list {
  display: grid;
  gap: 9px;
}

.position {
  padding: 15px;
}

.position-head,
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.position-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.position-title .asset-icon {
  width: 38px;
  height: 38px;
  border-radius: 12px;
}

.position-values {
  text-align: right;
}

.position-values strong {
  display: block;
  font-size: 14px;
}

.position-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.allocation {
  position: relative;
  width: 150px;
  height: 150px;
  margin: 3px auto 18px;
}

.allocation canvas {
  width: 100%;
  height: 100%;
}

.allocation-center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
  pointer-events: none;
}

.allocation-center strong {
  font-size: 17px;
}

.allocation-center span {
  color: var(--muted);
  font-size: 10px;
}

.history-filters,
.timeframes,
.chart-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 2px;
}

.chip {
  min-width: max-content;
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted-bright);
  font-size: 11px;
  font-weight: 720;
}

.chip.active {
  border-color: rgba(225, 184, 78, 0.35);
  background: rgba(225, 184, 78, 0.11);
  color: var(--gold-bright);
}

.history-list {
  display: grid;
  gap: 1px;
  margin-top: 13px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
  background: var(--line);
}

.history-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 11px;
  padding: 14px;
  background: var(--surface-strong);
}

.history-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  font-size: 15px;
}

.history-name {
  font-size: 13px;
  font-weight: 710;
}

.history-date {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.history-amount {
  max-width: 120px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 740;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 9px;
}

.profile-card {
  padding: 22px;
  text-align: center;
}

.avatar {
  display: grid;
  width: 72px;
  height: 72px;
  margin: 2px auto 12px;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(225, 184, 78, 0.4);
  border-radius: 25px;
  background: linear-gradient(145deg, #2d2616, #151310);
  color: var(--gold-bright);
  font-size: 22px;
  font-weight: 820;
}

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

.profile-name {
  font-size: 21px;
  font-weight: 790;
}

.level-track {
  height: 7px;
  margin-top: 15px;
  overflow: hidden;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.055);
}

.level-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold-dim), var(--gold-bright));
}

.profile-details {
  display: grid;
  gap: 0;
  padding: 2px 15px;
}

.profile-details > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.profile-details > div:last-child {
  border-bottom: 0;
}

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

.profile-details b {
  overflow: hidden;
  font-size: 12px;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.achievement {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid rgba(225, 184, 78, 0.2);
  border-radius: 12px;
  background: rgba(225, 184, 78, 0.07);
  color: var(--text);
  font-size: 11px;
  font-weight: 690;
}

.achievement span {
  color: var(--gold);
  font-size: 9px;
}

.ranking-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 19px;
}

.rank-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
}

.rank-row:last-child { border-bottom: 0; }
.rank-no { color: var(--muted); font-size: 12px; font-weight: 750; }
.rank-row:nth-child(-n+3) .rank-no { color: var(--gold); }
.rank-name { overflow: hidden; font-size: 13px; font-weight: 690; text-overflow: ellipsis; white-space: nowrap; }
.rank-value { font-size: 12px; font-weight: 720; }

.asset-hero {
  padding: 18px;
}

.asset-hero-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.asset-hero .asset-icon {
  width: 52px;
  height: 52px;
  border-radius: 17px;
}

.unit-price-label {
  margin-top: 18px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 680;
  letter-spacing: .02em;
}

.asset-hero-price {
  margin-top: 4px;
  font-size: clamp(28px, 8vw, 39px);
  font-weight: 810;
  letter-spacing: -0.05em;
}

.exact-price-hint {
  margin: 3px 0 7px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 620;
}

.chart-card {
  margin-top: 11px;
  padding: 13px 8px 9px;
}

.chart-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 5px 9px;
}

.chart-wrap {
  position: relative;
  height: min(61vw, 330px);
  min-height: 235px;
  overflow: hidden;
  border-radius: 14px;
  background:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 100% 25%, 25% 100%;
  touch-action: pan-y;
}

.chart-wrap canvas {
  width: 100%;
  height: 100%;
}

.chart-tooltip {
  position: absolute;
  z-index: 3;
  top: 9px;
  left: 9px;
  max-width: calc(100% - 18px);
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(8, 8, 10, 0.82);
  color: var(--muted-bright);
  font-size: 9px;
  pointer-events: none;
}

.asset-description {
  margin: 15px 3px 0;
  color: var(--muted-bright);
  font-size: 12px;
}

.sticky-actions {
  position: sticky;
  z-index: 5;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 7px);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 18px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(10, 10, 12, 0.91);
  box-shadow: 0 12px 45px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(16px);
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding:
    20px
    calc(10px + var(--safe-right))
    0
    calc(10px + var(--safe-left));
  background: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(7px);
  animation: fade 150ms ease both;
}

.sheet {
  width: min(100%, 620px);
  max-height: calc(100vh - var(--safe-top) - 18px);
  overflow-y: auto;
  padding: 9px 17px calc(18px + var(--safe-bottom));
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 0;
  border-radius: 27px 27px 0 0;
  background:
    radial-gradient(circle at 90% 0, rgba(225, 184, 78, 0.08), transparent 15rem),
    #121215;
  box-shadow: 0 -20px 80px rgba(0, 0, 0, 0.6);
  animation: sheet-in 180ms ease both;
  overscroll-behavior: contain;
}

@keyframes fade { from { opacity: 0; } }
@keyframes sheet-in { from { transform: translateY(20px); } }

.sheet-handle {
  width: 38px;
  height: 4px;
  margin: 0 auto 15px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.14);
}

.sheet-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.sheet h2 {
  margin: 0;
  font-size: 21px;
  letter-spacing: -0.035em;
}

.sheet-head p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.close-button {
  display: grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted-bright);
  font-size: 19px;
}

.field {
  margin-top: 18px;
}

.field label {
  display: block;
  margin: 0 3px 7px;
  color: var(--muted-bright);
  font-size: 11px;
  font-weight: 690;
}

.amount-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(7, 7, 9, 0.72);
}

.amount-input:focus-within {
  border-color: rgba(225, 184, 78, 0.45);
}

.amount-input input {
  width: 100%;
  height: 55px;
  padding: 0;
  outline: 0;
  border: 0;
  background: transparent;
  font-size: 21px;
  font-weight: 720;
}

.amount-input span {
  color: var(--gold);
  font-size: 13px;
  font-weight: 760;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.quick-grid .chip {
  min-width: 0;
  padding-inline: 4px;
}

.chat-list {
  display: grid;
  gap: 7px;
  max-height: 280px;
  overflow-y: auto;
}

.chat-choice {
  display: flex;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
  text-align: left;
}

.chat-choice.active {
  border-color: rgba(225, 184, 78, 0.45);
  background: rgba(225, 184, 78, 0.08);
}

.chat-choice strong {
  display: block;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-choice span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.quote-box {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid var(--line-gold);
  border-radius: 18px;
  background: rgba(225, 184, 78, 0.045);
}

.quote-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted-bright);
  font-size: 12px;
}

.quote-row strong {
  color: var(--text);
  text-align: right;
}

.quote-row.total {
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  font-weight: 750;
}

.sheet-actions {
  display: grid;
  grid-template-columns: minmax(90px, 0.55fr) 1fr;
  gap: 8px;
  margin-top: 19px;
}

.legal-note {
  margin: 16px 4px 0;
  color: #716f75;
  font-size: 9px;
  text-align: center;
}

.toast-stack {
  position: fixed;
  z-index: 200;
  right: 12px;
  bottom: calc(var(--nav-height) + var(--safe-bottom) + 12px);
  left: 12px;
  display: grid;
  justify-items: center;
  gap: 7px;
  pointer-events: none;
}

.toast {
  width: min(100%, 520px);
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(25, 25, 29, 0.96);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 12px;
  text-align: center;
  animation: toast-in 180ms ease both;
}

.toast.error { border-color: rgba(255, 94, 108, 0.35); }
.toast.success { border-color: rgba(57, 214, 159, 0.35); }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

.error-screen {
  display: grid;
  min-height: calc(100vh - var(--safe-top) - var(--safe-bottom));
  place-content: center;
  padding: 24px;
  text-align: center;
}

.error-screen h1 {
  margin: 12px 0 6px;
  font-size: 24px;
}

.error-screen p {
  max-width: 340px;
  margin: 0 auto 18px;
  color: var(--muted);
}

.skeleton {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.045) !important;
  color: transparent !important;
}

.skeleton::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255,255,255,.055) 45%, transparent 70%);
  content: "";
  animation: shimmer 1.2s linear infinite;
}

@keyframes shimmer { to { transform: translateX(100%); } }

.bottom-nav {
  position: fixed;
  z-index: 50;
  right: 0;
  bottom: 0;
  left: 0;
  height: calc(var(--nav-height) + var(--safe-bottom));
  padding:
    7px
    max(10px, var(--safe-right))
    var(--safe-bottom)
    max(10px, var(--safe-left));
  border-top: 1px solid rgba(255, 255, 255, 0.075);
  background: rgba(9, 9, 11, 0.92);
  box-shadow: 0 -14px 42px rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(22px) saturate(1.25);
}

.bottom-nav-inner {
  display: grid;
  width: min(100%, 740px);
  height: 100%;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  margin: 0 auto;
}

.nav-button {
  display: grid;
  min-width: 0;
  place-content: center;
  justify-items: center;
  gap: 4px;
  border-radius: 14px;
  background: transparent;
  color: #747379;
  font-size: 9px;
  font-weight: 680;
}

.nav-button svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.8;
}

.nav-button.active {
  background: linear-gradient(180deg, rgba(225, 184, 78, 0.11), transparent);
  color: var(--gold-bright);
}

.stock-page {
  --stock-blue: #6f85ff;
  --stock-violet: #9a76ff;
}

.stock-detail .asset-hero-head {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
}

.stock-detail .asset-hero-head > .pill {
  grid-column: 2;
  justify-self: start;
  margin-left: 0 !important;
}

.stock-hero {
  position: relative;
  display: grid;
  min-height: 152px;
  align-content: space-between;
  padding: 22px;
  overflow: hidden;
  border-color: rgba(111, 133, 255, 0.24);
  background:
    radial-gradient(circle at 88% 18%, rgba(154, 118, 255, 0.2), transparent 12rem),
    linear-gradient(145deg, rgba(26, 28, 44, 0.96), rgba(13, 13, 17, 0.92));
}

.stock-hero::before {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 28px 28px;
  content: "";
  mask-image: linear-gradient(90deg, transparent, #000);
  pointer-events: none;
}

.stock-hero-mark {
  position: absolute;
  top: 24px;
  right: 20px;
  color: rgba(255, 255, 255, 0.16);
  font-size: 28px;
  font-weight: 950;
  letter-spacing: 0.1em;
}

.stock-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 14px 0 0;
}

.stock-tabs .chip {
  min-width: 0;
  padding-inline: 8px;
  font-size: 12px;
}

.stock-list {
  display: grid;
  gap: 10px;
}

.stock-card,
.ipo-card,
.order-card,
.placement-card {
  width: 100%;
  padding: 15px;
  color: var(--text);
  text-align: left;
}

button.stock-card {
  transition: border-color 150ms ease, transform 150ms ease;
}

button.stock-card:active {
  transform: scale(0.988);
}

.stock-card-head {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.stock-card-title {
  display: block;
  min-width: 0;
  flex: 1;
}

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

.stock-card-title strong {
  font-size: 13px;
}

.stock-card-title span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.stock-card-price {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 13px;
}

.stock-unit-price,
.stock-market-cap {
  min-width: 0;
}

.stock-unit-price {
  flex: 1 1 auto;
  text-align: left;
}

.stock-market-cap {
  flex: 0 1 46%;
  text-align: right;
}

.stock-card-price small {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 650;
}

.stock-card-price strong {
  display: block;
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-market-cap b {
  display: block;
  overflow: hidden;
  color: var(--text);
  font-size: 11px;
  font-weight: 720;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stock-card-meta {
  color: var(--muted);
  font-size: 10px;
}

.stock-card-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 7px 12px;
  margin-top: 8px;
}

.ipo-progress {
  height: 6px;
  margin: 15px 0 7px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255,255,255,.06);
}

.ipo-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--green));
}

.compact-grid {
  margin: 14px 0;
}

.notice-line,
.danger-note,
.source-banner {
  margin: 13px 0;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255,255,255,.025);
  color: var(--muted-bright);
  font-size: 11px;
}

.danger-note {
  border-color: rgba(255, 94, 108, 0.22);
  background: var(--red-soft);
}

.source-banner {
  display: grid;
  gap: 2px;
  border-color: rgba(111, 133, 255, 0.22);
  background: linear-gradient(90deg, rgba(85, 156, 255, 0.08), rgba(143, 124, 255, 0.05));
}

.source-banner span,
.source-banner small {
  color: var(--muted);
  font-size: 9px;
  text-transform: uppercase;
}

.source-banner strong {
  font-size: 14px;
}

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

.button.danger {
  border: 1px solid rgba(255, 94, 108, 0.28);
  background: var(--red-soft);
  color: #ff9aa3;
}

.orderbook {
  padding: 13px;
}

.book-side {
  display: grid;
  gap: 2px;
}

.book-head,
.book-row {
  display: grid;
  grid-template-columns: 0.65fr 1fr 1fr;
  align-items: center;
  gap: 8px;
  min-height: 27px;
  font-size: 10px;
}

.book-head {
  color: var(--muted);
}

.book-row b,
.book-row span:last-child,
.book-head span:not(:first-child) {
  text-align: right;
}

.book-spread {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 9px -13px;
  padding: 10px 13px;
  border-block: 1px solid var(--line);
  background: rgba(255,255,255,.018);
  font-size: 9px;
}

.book-spread strong {
  color: var(--gold-bright);
  font-size: 14px;
}

.book-empty {
  padding: 12px 0;
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.segmented {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255,255,255,.025);
}

.segmented button {
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
}

.segmented button.active {
  background: rgba(225, 184, 78, 0.13);
  color: var(--gold-bright);
}

.listing-offer {
  grid-auto-flow: row;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.listing-fundamentals {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 13px 0;
  padding: 13px;
}

.listing-fundamentals span,
.listing-fundamentals b {
  display: block;
}

.listing-fundamentals span {
  color: var(--muted);
  font-size: 9px;
}

.listing-fundamentals b {
  margin-top: 2px;
  font-size: 11px;
}

.listing-entry-actions {
  display: grid;
  gap: 8px;
}

.listing-requirements-button {
  margin: 2px 0 10px;
}

.listing-readiness.ready,
.requirements-summary.ready {
  border-color: rgba(57, 214, 159, 0.25);
  background: var(--green-soft);
  color: #9eecd0;
}

.listing-readiness.blocked,
.requirements-summary.blocked {
  border-color: rgba(255, 94, 108, 0.25);
  background: var(--red-soft);
  color: #ffc1c7;
}

.requirements-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 13px 0 9px;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 14px;
  font-size: 11px;
}

.requirements-summary strong {
  font-size: 12px;
}

.requirements-list {
  display: grid;
  gap: 8px;
}

.requirement-row {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.025);
}

.requirement-row.passed {
  border-color: rgba(57, 214, 159, 0.18);
}

.requirement-row.failed {
  border-color: rgba(255, 94, 108, 0.24);
  background: rgba(255, 94, 108, 0.055);
}

.requirement-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 10px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

.requirement-row.failed .requirement-icon {
  background: var(--red-soft);
  color: var(--red);
}

.requirement-row strong,
.requirement-row span,
.requirement-row small,
.requirement-row p {
  display: block;
}

.requirement-row strong {
  font-size: 12px;
}

.requirement-row span {
  margin-top: 2px;
  color: var(--text);
  font-size: 11px;
}

.requirement-row small {
  margin-top: 2px;
  color: var(--muted-bright);
  font-size: 10px;
}

.requirement-row p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 9px;
}

.policy-card {
  display: grid;
  gap: 10px;
  margin: 13px 0;
  padding: 14px;
}

.policy-card h3,
.listing-final-rules h3 {
  margin: 0 0 3px;
  font-size: 12px;
}

.policy-card > div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 10px;
}

.policy-card b {
  color: var(--text);
  text-align: right;
}

.listing-final-rules {
  display: grid;
  gap: 7px;
  margin-top: 14px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.02);
}

.listing-final-rules > div {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 6px;
  color: var(--muted-bright);
  font-size: 10px;
}

.listing-final-rules i {
  color: var(--gold);
  font-style: normal;
}

.single-action {
  grid-template-columns: 1fr;
}

.compact-empty {
  display: grid;
  gap: 8px;
  padding: 14px;
}

.compact-empty strong,
.compact-empty span {
  display: block;
}

.compact-empty span {
  color: var(--muted);
  font-size: 10px;
}

.compact-empty .button {
  margin-top: 3px;
}

.text-input {
  width: 100%;
  min-height: 46px;
  padding: 12px;
  resize: vertical;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  background: rgba(255,255,255,.03);
}

textarea.text-input {
  min-height: 110px;
}

.company-card {
  padding: 16px;
}

.disclaimer-bar {
  margin: 22px 7px 4px;
  color: #646268;
  font-size: 9px;
  text-align: center;
}

@media (min-width: 620px) {
  .app-shell { padding-inline: 20px; }
  .market-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(250px, 0.75fr);
    gap: 12px;
  }
  .market-layout .section { margin-top: 0; }
  .stats-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .position-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .movers { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 370px) {
  .app-shell { padding-inline: 10px; }
  .asset-row {
    grid-template-columns: auto minmax(66px, 1fr) minmax(76px, auto);
    gap: 8px;
    padding: 11px;
  }
  .asset-row .spark { display: none; }
  .asset-icon { width: 38px; height: 38px; border-radius: 12px; }
  .hero-card { padding: 19px; }
  .button { padding-inline: 9px; }
}

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

/* v4.13.2 — audited issuer console */
.issuer-manage-button { margin-top: 10px; }
.privacy-card { padding: 16px; }
.toggle {
  width: 48px;
  height: 28px;
  border: 1px solid var(--line, rgba(255,255,255,.11));
  border-radius: 999px;
  background: rgba(255,255,255,.07);
  padding: 3px;
  display: inline-flex;
  align-items: center;
  transition: .2s ease;
}
.toggle i {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #8f9098;
  transform: translateX(0);
  transition: .2s ease;
}
.toggle.active { background: rgba(57,214,159,.18); border-color: rgba(57,214,159,.45); }
.toggle.active i { background: #39d69f; transform: translateX(19px); box-shadow: 0 0 16px rgba(57,214,159,.35); }
.preference-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin-top: 14px; }
.preference-button {
  min-height: 42px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,.09);
  color: var(--muted, #aaa);
  background: rgba(255,255,255,.035);
  font-weight: 700;
}
.preference-button.active { color: #dcfff2; background: rgba(57,214,159,.12); border-color: rgba(57,214,159,.32); }
.issuer-dashboard-page { padding-bottom: 28px; }
.issuer-dashboard-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 0 1px 5px;
  margin-bottom: 14px;
}
.issuer-dashboard-tabs .chip {
  width: 100%;
  min-width: 0;
  padding-inline: 7px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.issuer-summary { padding: 17px; }
.issuer-cap-table { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 9px; margin-top: 14px; }
.issuer-cap-table > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 11px;
  border-radius: 13px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.07);
}
.issuer-cap-table span { color: var(--muted, #9c9da7); font-size: 12px; }
.issuer-cap-table strong { font-size: 15px; }
.holder-list, .timeline-list { display: grid; gap: 9px; }
.holder-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 14px;
  border-radius: 15px;
  background: rgba(255,255,255,.035);
  border: 1px solid rgba(255,255,255,.075);
}
.holder-row > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.holder-row > div:last-child { text-align: right; align-items: flex-end; }
.holder-row strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 210px; }
.holder-row span { color: var(--muted, #9c9da7); font-size: 12px; }
.history-panel { padding: 15px; }
.timeline-item { padding: 14px; }
.timeline-item > div { display: flex; justify-content: space-between; gap: 10px; }
.timeline-item span { color: var(--muted, #9c9da7); font-size: 11px; white-space: nowrap; }
.timeline-item p { margin: 8px 0 0; color: #c4c5cc; font-size: 13px; line-height: 1.45; }
.issuer-description { min-height: 120px; resize: vertical; }
@media (max-width: 370px) {
  .issuer-cap-table, .preference-grid { grid-template-columns: 1fr; }
  .holder-row strong { max-width: 155px; }
}

.stock-card {
  box-shadow: inset 3px 0 0 var(--issuer-accent, #a98cff), var(--shadow);
}

.issuer-branded {
  box-shadow: inset 0 3px 0 var(--issuer-accent, #a98cff), var(--shadow);
}

/* v4.13.3 — Premium Mini App polish and mobile reliability */
:root {
  --keyboard-offset: 0px;
  --surface-glass: rgba(17, 17, 20, 0.76);
  --line-strong: rgba(255, 255, 255, 0.12);
  --gold-glow: rgba(225, 184, 78, 0.2);
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  background:
    linear-gradient(115deg, transparent 0 48%, rgba(255,255,255,.012) 49% 50%, transparent 51% 100%),
    radial-gradient(circle at 50% 115%, rgba(67, 76, 177, 0.1), transparent 42rem);
  background-size: 74px 74px, auto;
  content: "";
  pointer-events: none;
}

.app-shell {
  padding-top: calc(var(--safe-top) + 2px);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  margin: 0 -6px 8px;
  padding: 7px 6px;
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(6, 6, 7, .96), rgba(6, 6, 7, .76) 72%, transparent);
  backdrop-filter: blur(20px) saturate(1.25);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.network-badge {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid rgba(57, 214, 159, .18);
  border-radius: 999px;
  background: rgba(57, 214, 159, .055);
  color: #91e9c9;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .09em;
}

.network-badge i,
.live-dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(57, 214, 159, .08), 0 0 12px rgba(57, 214, 159, .45);
}

.brand-mode {
  display: flex;
  align-items: center;
  gap: 5px;
}

.icon-button,
.close-button,
.nav-button,
.button,
.chip,
.asset-row,
.mover,
.stock-card,
.chat-choice,
.preference-button {
  transition: transform 150ms ease, border-color 150ms ease, background-color 150ms ease,
    color 150ms ease, box-shadow 150ms ease;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid rgba(246, 212, 119, .8);
  outline-offset: 2px;
}

.icon-button:hover,
.close-button:hover {
  border-color: var(--line-strong);
  background: rgba(32, 32, 36, .92);
}

.card {
  border-color: rgba(255, 255, 255, .085);
  background:
    linear-gradient(145deg, rgba(28, 28, 32, .9), rgba(12, 12, 15, .91));
  box-shadow: 0 14px 46px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255,255,255,.025);
}

.market-hero {
  min-height: 238px;
  display: grid;
  align-content: space-between;
  isolation: isolate;
}

.market-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(246, 212, 119, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(246, 212, 119, .028) 1px, transparent 1px);
  background-size: 31px 31px;
  mask-image: linear-gradient(115deg, transparent 5%, #000 45%, transparent 92%);
  content: "";
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-market-line {
  position: absolute;
  z-index: 0;
  right: -4px;
  bottom: 42px;
  width: min(58%, 270px);
  height: 92px;
  opacity: .78;
  pointer-events: none;
}

.hero-area { fill: url(#mxFill); }
.hero-line {
  fill: none;
  stroke: url(#mxLine);
  stroke-width: 2.2;
  stroke-linecap: round;
  filter: drop-shadow(0 0 7px rgba(246, 212, 119, .35));
}
.hero-line-dot { fill: var(--green); filter: drop-shadow(0 0 7px var(--green)); }

.hero-quick-actions {
  position: relative;
  z-index: 3;
  display: flex;
  gap: 8px;
  margin-top: 28px;
}

.hero-quick-actions button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border: 1px solid rgba(246, 212, 119, .16);
  border-radius: 12px;
  background: rgba(8, 8, 10, .46);
  color: var(--muted-bright);
  font-size: 11px;
  font-weight: 720;
  backdrop-filter: blur(10px);
}

.hero-quick-actions button:first-child {
  border-color: rgba(57, 214, 159, .22);
  color: #bdf7e2;
}

.hero-quick-actions button span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 7px;
  border: 1px solid rgba(246, 212, 119, 0.16);
  background: rgba(246, 212, 119, 0.12);
  color: var(--gold-bright);
  font-size: 13px;
}

.hero-quick-actions button span svg {
  width: 13px;
  height: 13px;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-shortcut {
  overflow: hidden;
  border-color: rgba(246, 212, 119, 0.2);
  background: linear-gradient(145deg, rgba(45, 38, 22, 0.9), rgba(17, 16, 14, 0.9));
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 850;
}

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

.stats-grid {
  gap: 8px;
}
.metric {
  min-height: 70px;
  display: grid;
  align-content: center;
  padding: 13px 14px;
  background: linear-gradient(145deg, rgba(23, 23, 27, .8), rgba(13, 13, 16, .76));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}
.metric-value { font-size: 15px; }

.search input,
.text-input,
.amount-input {
  border-color: rgba(255,255,255,.09);
  background: rgba(12, 12, 15, .88);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.02);
}

.asset-row {
  min-height: 72px;
  border-color: rgba(255,255,255,.075);
  background:
    linear-gradient(100deg, rgba(31, 31, 35, .82), rgba(13, 13, 16, .88));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.018);
}
.asset-row:hover,
.stock-card:hover,
.mover:hover {
  border-color: rgba(246, 212, 119, .18);
  transform: translateY(-1px);
}
.asset-icon {
  border: 1px solid rgba(255,255,255,.07);
  box-shadow: inset 0 0 15px rgba(255,255,255,.025), 0 7px 18px rgba(0,0,0,.2);
}
.spark { opacity: .92; }

.mover {
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0, rgba(143,124,255,.08), transparent 8rem),
    linear-gradient(145deg, rgba(24,24,28,.88), rgba(12,12,15,.9));
}

.button {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.button:not(:disabled):active,
.icon-button:not(:disabled):active,
.nav-button:not(:disabled):active,
.hero-quick-actions button:active {
  transform: scale(.975);
}
.button.primary {
  background: linear-gradient(145deg, #f6d477, #bb8624 78%);
  box-shadow: 0 10px 28px rgba(176, 126, 28, .17), inset 0 1px 0 rgba(255,255,255,.38);
}
.button.success {
  box-shadow: 0 10px 25px rgba(25, 134, 95, .14), inset 0 1px 0 rgba(255,255,255,.2);
}

.bottom-nav {
  height: calc(var(--nav-height) + var(--safe-bottom) + var(--keyboard-offset));
  padding-bottom: calc(var(--safe-bottom) + var(--keyboard-offset));
  border-top-color: rgba(255,255,255,.09);
  background: rgba(8, 8, 10, .9);
}
.keyboard-open .bottom-nav { opacity: 0; pointer-events: none; }
.bottom-nav-inner {
  gap: 3px;
  padding: 3px;
  border: 1px solid rgba(255,255,255,.055);
  border-radius: 19px;
  background: rgba(255,255,255,.018);
}
.nav-button {
  position: relative;
  min-height: 58px;
  overflow: hidden;
}
.nav-button::after {
  position: absolute;
  top: 2px;
  width: 18px;
  height: 2px;
  border-radius: 99px;
  background: transparent;
  content: "";
}
.nav-button.active {
  background: linear-gradient(180deg, rgba(225,184,78,.13), rgba(225,184,78,.025));
  box-shadow: inset 0 0 0 1px rgba(225,184,78,.07);
}
.nav-button.active::after { background: var(--gold-bright); box-shadow: 0 0 9px var(--gold); }
.nav-button.active svg { filter: drop-shadow(0 0 6px rgba(225,184,78,.3)); }

.network-badge.syncing {
  color: var(--gold-bright);
}
.network-badge.syncing i {
  background: var(--gold);
  box-shadow: 0 0 8px rgba(225,184,78,.55);
}
.network-badge.offline {
  color: #ff9ba4;
}
.network-badge.offline i {
  background: var(--red);
  box-shadow: 0 0 8px rgba(255,94,108,.5);
}

.history-row,
.stock-card,
.news-card,
.holder-row,
.timeline-item {
  content-visibility: auto;
  contain-intrinsic-size: auto 76px;
}

.stock-hero {
  min-height: 214px;
  isolation: isolate;
}
.stock-hero-chart {
  position: absolute;
  right: -2px;
  bottom: 0;
  width: min(61%, 270px);
  height: 120px;
  opacity: .75;
  pointer-events: none;
}
.stock-chart-fill { fill: rgba(143,124,255,.09); }
.stock-chart-line {
  fill: none;
  stroke: #a98cff;
  stroke-width: 2.2;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 7px rgba(169,140,255,.42));
}
.stock-hero-chart circle { fill: #77d7ff; filter: drop-shadow(0 0 6px #77d7ff); }
.stock-hero-mark { opacity: .55; }

.stock-tabs,
.issuer-dashboard-tabs {
  padding: 4px;
  border: 1px solid rgba(255,255,255,.065);
  border-radius: 17px;
  background: rgba(255,255,255,.018);
}
.stock-tabs .chip,
.issuer-dashboard-tabs .chip {
  min-height: 38px;
  border: 0;
  border-radius: 12px;
  background: transparent;
}
.stock-tabs .chip.active,
.issuer-dashboard-tabs .chip.active {
  background: rgba(225,184,78,.12);
  box-shadow: inset 0 0 0 1px rgba(225,184,78,.11);
}

.stock-card {
  box-shadow: inset 3px 0 0 var(--issuer-accent, #a98cff), 0 13px 38px rgba(0,0,0,.24);
}
.stock-card-price strong { letter-spacing: -.025em; }

.modal-backdrop {
  padding-bottom: var(--keyboard-offset);
  background: rgba(0,0,0,.73);
  backdrop-filter: blur(11px) saturate(.9);
}
.sheet {
  max-height: calc(100dvh - var(--safe-top) - var(--keyboard-offset) - 14px);
  border-color: rgba(255,255,255,.12);
  background:
    radial-gradient(circle at 85% 0, rgba(225,184,78,.09), transparent 16rem),
    linear-gradient(180deg, #17171b, #0e0e11);
  box-shadow: 0 -24px 90px rgba(0,0,0,.68), inset 0 1px 0 rgba(255,255,255,.035);
}
.sheet-handle { background: rgba(255,255,255,.2); }
.quote-box {
  border-color: rgba(255,255,255,.085);
  background: rgba(7,7,9,.38);
}
.chat-choice.active {
  border-color: rgba(246,212,119,.32);
  background: linear-gradient(90deg, rgba(225,184,78,.11), rgba(225,184,78,.035));
}

.toast {
  border-color: rgba(255,255,255,.13);
  background: rgba(20,20,24,.97);
  backdrop-filter: blur(15px);
}

@media (max-width: 470px) {
  .network-badge { display: none; }
  .market-hero { min-height: 224px; }
  .hero-market-line { width: 55%; bottom: 47px; opacity: .6; }
  .stock-hero-chart { width: 58%; opacity: .58; }
  .hero-quick-actions { margin-top: 24px; }
}

@media (max-width: 370px) {
  .brand-name { font-size: 12px; }
  .brand-mode { font-size: 8px; }
  .market-hero { min-height: 216px; }
  .hero-market-line { width: 48%; height: 74px; bottom: 54px; opacity: .38; }
  .hero-quick-actions button { flex: 1; justify-content: center; padding-inline: 7px; }
  .nav-button span { font-size: 8px; }
  .stock-hero-chart { opacity: .38; }
}

/* v4.15.2 — Public Release Deposit & Fullscreen Reliability */
:root {
  --tg-bg: var(--tg-theme-bg-color, #060607);
  --tg-text: var(--tg-theme-text-color, #f6f4ef);
  --tg-hint: var(--tg-theme-hint-color, #908f95);
  --tg-button: var(--tg-theme-button-color, #e1b84e);
  --tg-button-text: var(--tg-theme-button-text-color, #120e06);
  --content-max: 760px;
}

html,
body {
  min-height: 100dvh;
}

body {
  color: var(--tg-text);
  background-color: var(--tg-bg);
}

body.modal-open {
  overflow: hidden;
  touch-action: none;
}

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.page-heading-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 14px;
}

.page-heading-row > div {
  min-width: 0;
}

.sync-chip {
  flex: 0 0 auto;
  margin-bottom: 3px;
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.connection-banner {
  display: grid;
  gap: 2px;
  margin: 2px 0 12px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 94, 108, 0.24);
  border-radius: 14px;
  background: rgba(255, 94, 108, 0.075);
  color: #ffd7da;
}

.connection-banner strong {
  font-size: 12px;
}

.connection-banner span {
  color: #caaeb1;
  font-size: 10px;
}

.network-badge.ready {
  border-color: rgba(85, 156, 255, 0.18);
  background: rgba(85, 156, 255, 0.055);
  color: #a9ceff;
}

.network-badge.ready i {
  background: var(--blue);
  box-shadow: 0 0 0 3px rgba(85, 156, 255, 0.08), 0 0 12px rgba(85, 156, 255, 0.38);
}

.refresh-button.is-loading svg {
  animation: mx-spin 0.8s linear infinite;
}

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

.button.is-loading {
  position: relative;
  cursor: wait;
}

.button.is-loading::before {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  content: "";
  animation: mx-spin 0.7s linear infinite;
}

.loading-state {
  display: flex;
  min-height: 100px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--muted-bright);
  text-align: center;
}

.spinner {
  width: 19px;
  height: 19px;
  border: 2px solid rgba(246, 212, 119, 0.22);
  border-top-color: var(--gold-bright);
  border-radius: 50%;
  animation: mx-spin 0.75s linear infinite;
}

.modal-backdrop {
  overscroll-behavior: contain;
}

.sheet {
  max-height: min(88dvh, calc(100dvh - var(--safe-top) - 8px));
  padding-bottom: calc(20px + var(--safe-bottom) + var(--keyboard-offset));
  scrollbar-width: thin;
  scrollbar-color: rgba(246, 212, 119, 0.22) transparent;
}

.sheet h2 {
  text-wrap: balance;
}

.sheet-actions .button,
.sticky-actions .button,
.hero-quick-actions button,
.nav-button,
.icon-button,
.close-button,
.chip,
.chat-choice,
.preference-button {
  min-height: 44px;
}

.close-button {
  min-width: 44px;
}

.quote-row strong,
.metric-value,
.asset-price strong,
.hero-value {
  overflow-wrap: anywhere;
}

.error-badge {
  margin: 0 auto 8px;
  padding: 5px 9px;
  border: 1px solid rgba(57, 214, 159, 0.22);
  border-radius: 999px;
  background: rgba(57, 214, 159, 0.07);
  color: #a6efd4;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.request-code {
  display: block;
  max-width: 100%;
  margin: 2px auto 16px;
  padding: 8px 10px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.025);
  color: var(--muted);
  font: 10px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.quote-error {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 11px 13px;
  border: 1px solid rgba(255, 94, 108, 0.32);
  border-radius: 13px;
  background: rgba(255, 94, 108, 0.08);
  color: #f3d9dc;
  font-size: 12px;
}

.quote-error strong {
  color: #ff9aa4;
  font-size: 12px;
}

.quote-error code {
  overflow-wrap: anywhere;
  color: var(--muted-bright);
  font: 10px/1.35 ui-monospace, SFMono-Regular, Menlo, monospace;
}

.error-help {
  margin-top: 12px !important;
  color: var(--muted) !important;
  font-size: 11px !important;
}

.toast {
  transform-origin: bottom center;
  animation: toast-in 180ms ease both;
}

.toast.toast-out {
  animation: toast-out 180ms ease both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toast-out {
  to { opacity: 0; transform: translateY(5px) scale(0.98); }
}

.asset-row,
.stock-card,
.ipo-card,
.order-card,
.placement-card,
.history-row,
.chat-choice {
  contain: layout paint;
}

@media (max-width: 430px) {
  .page-heading-row {
    align-items: flex-start;
  }

  .sync-chip {
    display: none;
  }

  .brand-mode > span:last-child {
    max-width: 124px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .network-badge {
    min-width: 28px;
    justify-content: center;
    padding-inline: 7px;
    font-size: 0;
  }

  .network-badge i {
    width: 7px;
    height: 7px;
  }

  .nav-button span {
    font-size: 8.5px;
  }
}

@media (max-width: 340px) {
  .brand-mode {
    display: none;
  }

  .bottom-nav-inner {
    gap: 1px;
  }

  .nav-button {
    min-height: 54px;
    padding-inline: 1px;
  }

  .nav-button span {
    font-size: 7.5px;
  }
}

@media (hover: none) {
  .asset-row:hover,
  .stock-card:hover,
  .mover:hover {
    transform: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --line: rgba(255, 255, 255, 0.19);
    --muted: #b8b6bc;
  }

  .card,
  .asset-row,
  .stock-card,
  .history-row,
  .chat-choice {
    border-color: rgba(255, 255, 255, 0.2);
  }
}

/* v4.17.8 — total text and UX audit */
.user-crypto-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  margin: 16px 0;
  padding: 16px;
  border: 1px solid rgba(231, 200, 91, .25);
  border-radius: 22px;
  background: linear-gradient(135deg, rgba(78, 61, 19, .45), rgba(16, 17, 21, .96) 58%);
}
.user-crypto-card.pending { border-color: rgba(57, 214, 159, .28); }
.user-crypto-card.review { border-color: rgba(231, 200, 91, .35); }
.user-crypto-card.created { border-color: rgba(139, 124, 255, .28); }
.user-crypto-star,
.user-crypto-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  color: #14120b;
  background: #e7c85b;
  font-size: 23px;
  font-weight: 800;
}
.user-crypto-mark {
  color: #fff;
  background: var(--player-crypto-color, #e7c85b);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.24);
}
.user-crypto-copy { min-width: 0; display: grid; gap: 4px; }
.user-crypto-copy span { color: #e7c85b; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.user-crypto-copy strong { font-size: 16px; }
.user-crypto-copy small { color: var(--muted, #92949d); line-height: 1.35; }
.asset-icon.player-crypto {
  background: color-mix(in srgb, var(--player-crypto-color) 36%, #111 64%);
  border-color: color-mix(in srgb, var(--player-crypto-color) 70%, #fff 30%);
}
.asset-icon.player-crypto .asset-icon-fallback { color: #fff; }
.user-crypto-form-note {
  margin-bottom: 16px;
  padding: 13px 14px;
  border-radius: 16px;
  color: #d8d8dc;
  background: rgba(231, 200, 91, .08);
  border: 1px solid rgba(231, 200, 91, .17);
  line-height: 1.45;
}
.user-crypto-symbol-input { text-transform: uppercase; letter-spacing: .12em; font-weight: 700; }
.user-crypto-colors { display: flex; flex-wrap: wrap; gap: 12px; }
.user-crypto-color {
  width: 42px;
  height: 42px;
  padding: 0;
  border-radius: 14px;
  border: 2px solid transparent;
  background: var(--crypto-choice);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.user-crypto-color.active {
  border-color: #fff;
  box-shadow: 0 0 0 3px rgba(231, 200, 91, .25), inset 0 0 0 1px rgba(255,255,255,.3);
}
.field-counter { display: block; margin-top: 6px; color: var(--muted, #92949d); text-align: right; }
@media (max-width: 540px) {
  .user-crypto-card { grid-template-columns: auto minmax(0, 1fr); }
  .user-crypto-card > .button { grid-column: 1 / -1; width: 100%; }
}

/* v4.17.17 — player crypto creator revenue */
.user-crypto-revenue-note {
  margin-bottom: 16px;
  padding: 14px 15px;
  border: 1px solid rgba(139, 124, 255, .22);
  border-radius: 17px;
  background: rgba(139, 124, 255, .08);
  color: #dddde5;
  line-height: 1.5;
}
.user-crypto-revenue-history { margin-top: 18px; }
.user-crypto-revenue-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.user-crypto-revenue-row:last-child { border-bottom: 0; }
.user-crypto-revenue-row > div { min-width: 0; display: grid; gap: 4px; }
.user-crypto-revenue-row > div:last-child { text-align: right; }
.user-crypto-revenue-row strong { font-size: 14px; }
.user-crypto-revenue-row span { color: var(--muted, #92949d); font-size: 12px; line-height: 1.35; }
