@font-face {
  font-family: "Switzer";
  src: url("https://miniapp.gate.com/cdn/fe/static/fonts/Switzer/Switzer-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Switzer";
  src: url("https://miniapp.gate.com/cdn/fe/static/fonts/Switzer/Switzer-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Switzer";
  src: url("https://miniapp.gate.com/cdn/fe/static/fonts/Switzer/Switzer-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
}

:root {
  --bg: #f3f5f7;
  --panel: #ffffff;
  --line: #e3e8f0;
  --text: #151b28;
  --muted: #7a8394;
  --green: #0a8a63;
  --red: #d25266;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Switzer", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  padding-bottom: 25px;
}

button,
a {
  font-family: inherit;
}

.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
}

.top-nav {
  height: 49px;
  min-height: 49px;
  background: #030507;
  color: #d4d9e2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 12px;
}

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

.logo-link {
  display: inline-flex;
  align-items: center;
  width: 154px;
  min-width: 154px;
  height: 49px;
  text-decoration: none;
  overflow: hidden;
}

.logo-icon {
  width: 154px;
  height: 38px;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: translateY(0);
}

.primary-nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.primary-nav a {
  color: #a7aeb9;
  text-decoration: none;
  font-size: 14px;
  line-height: 49px;
  white-space: nowrap;
}

.primary-nav a:hover {
  color: #fff;
}

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

.icon-btn {
  border: 0;
  background: transparent;
  color: #a6afbe;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  font-size: 16px;
  cursor: pointer;
}

.icon-btn:hover {
  background: #161d2c;
  color: #fff;
}

.log-link {
  color: #d2d8e2;
  text-decoration: none;
  font-size: 13px;
}

.signup-btn {
  border: 0;
  background: #f4f6f9;
  color: #111722;
  border-radius: 18px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.stellar-connect-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  max-width: 172px;
  white-space: nowrap;
}

.stellar-connect-btn span:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.stellar-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #98a2b3;
  box-shadow: 0 0 0 2px rgba(152, 162, 179, 0.12);
  flex: 0 0 auto;
}

.stellar-connect-btn.is-connected .stellar-status-dot {
  background: #14a46f;
  box-shadow: 0 0 0 2px rgba(20, 164, 111, 0.16);
}

.wallet-disconnect-btn {
  border: 0;
  background: transparent;
  color: #9ca5b4;
  font-size: 12px;
  padding: 0 2px;
  cursor: pointer;
}

.wallet-disconnect-btn:hover {
  color: #ffffff;
}

.stellar-wallet-modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 20, 28, 0.58);
}

.stellar-wallet-card {
  position: relative;
  width: min(94vw, 420px);
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.92);
  background: #fff;
  box-shadow: 0 28px 80px rgba(6, 12, 22, 0.28);
  padding: 20px;
}

.stellar-wallet-close {
  position: absolute;
  top: 12px;
  right: 13px;
  border: 0;
  background: transparent;
  color: #8a93a3;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.stellar-wallet-card-head {
  display: flex;
  gap: 13px;
  align-items: center;
  padding-right: 22px;
  margin-bottom: 18px;
}

.stellar-wallet-mark {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #0b0f16;
  color: #ffffff;
  font-weight: 700;
  box-shadow: inset 0 0 0 3px #1c9e70;
}

.stellar-wallet-card h2 {
  margin: 0;
  color: #141b28;
  font-size: 20px;
  line-height: 25px;
}

.stellar-wallet-card p {
  margin: 3px 0 0;
  color: #6f7888;
  font-size: 13px;
  line-height: 18px;
}

.stellar-wallet-options {
  display: grid;
  gap: 9px;
}

.stellar-wallet-loading {
  min-height: 92px;
  display: grid;
  place-items: center;
  color: #7b8494;
  font-size: 14px;
}

.stellar-wallet-option {
  min-height: 62px;
  border: 1px solid #e4e9f1;
  border-radius: 12px;
  background: #fbfcfe;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  cursor: pointer;
}

.stellar-wallet-option:hover {
  border-color: #cbd5e1;
  background: #ffffff;
}

.stellar-wallet-option-main {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.stellar-wallet-option-main img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.stellar-wallet-option-main strong,
.stellar-wallet-option-main small {
  display: block;
}

.stellar-wallet-option-main strong {
  color: #141b28;
  font-size: 14px;
  line-height: 18px;
}

.stellar-wallet-option-main small {
  color: #778293;
  font-size: 12px;
  line-height: 16px;
}

.stellar-wallet-option-action {
  color: #13774f;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.stellar-wallet-option.unavailable {
  opacity: 0.66;
}

.stellar-wallet-option.unavailable .stellar-wallet-option-action {
  color: #5f6b7c;
}

.stellar-wallet-option.is-connecting {
  cursor: wait;
  opacity: 0.76;
}

.market-strip {
  grid-column: 1 / 3;
  grid-row: 1;
  height: 69px;
  min-height: 69px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 6px 20px;
  border-top: 0;
  overflow: hidden;
}

.pair-box {
  min-width: 306px;
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.pair-icon {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: #0b0c0d url("./assets/xlm-icon.png") center / cover no-repeat;
  color: transparent;
  font-size: 0;
  line-height: 1;
}

.pair-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 18px;
  line-height: 22px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-contract {
  font-size: 11px;
  color: #333b48;
  font-weight: 500;
  background: #eef1f5;
  border-radius: 3px;
  padding: 1px 5px;
}

.badge-pre {
  font-size: 11px;
  color: #ab622e;
  background: #f3dfd2;
  border-radius: 4px;
  padding: 1px 5px;
  vertical-align: middle;
}

.market-caret {
  color: #6f7887;
  font-size: 13px;
  line-height: 1;
  transform: translateY(1px);
  transition: transform 140ms ease, color 140ms ease;
}

.pair-box:hover .market-caret,
.pair-box.is-open .market-caret {
  color: #1c2534;
}

.pair-box.is-open .market-caret {
  transform: translateY(1px) rotate(180deg);
}

.header-star {
  color: #cfd5df;
  font-size: 20px;
  line-height: 1;
  margin-left: 4px;
}

.pair-sub {
  font-size: 12px;
  line-height: 18px;
  color: #7f8898;
  white-space: nowrap;
}

.badge-muted {
  color: #0b62bf;
  background: #eef5ff;
  border: 1px solid #d3e7ff;
  border-radius: 4px;
  padding: 0 5px;
}

.pair-mobile-contract,
.mobile-menu {
  display: none;
}

.market-points {
  margin-left: auto;
  color: #68a21b;
  font-size: 12px;
  font-weight: 600;
  display: none;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.market-points span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #c13643;
  display: inline-block;
  transform: translateY(-6px);
}

.price-block {
  min-width: 116px;
}

.spot-price {
  font-size: 24px;
  line-height: 28px;
  color: var(--green);
  font-weight: 600;
}

.spot-change {
  margin-top: 2px;
  color: var(--green);
  font-size: 13px;
  line-height: 17px;
}

.change-pct-mobile {
  display: none;
}

.stat-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, minmax(90px, 1fr));
  height: 100%;
}

.stat-item {
  border-left: 1px solid var(--line);
  padding: 12px 10px 0;
}

.stat-item span {
  color: #798291;
  font-size: 11px;
  display: block;
}

.stat-item strong {
  display: block;
  margin-top: 7px;
  font-size: 14px;
  line-height: 16px;
}

.stat-item .accent-green {
  color: var(--green);
}

.mobile-stat {
  display: none;
}

.market-selector {
  position: fixed;
  left: 0;
  top: 118px;
  bottom: 25px;
  z-index: 18;
  width: min(675px, 46vw);
  min-width: 360px;
  border-left: 0;
  border-top: 0;
  box-shadow: 12px 0 18px rgba(27, 36, 48, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.market-search-row {
  display: grid;
  grid-template-columns: 1fr 42px;
  gap: 10px;
  align-items: center;
  padding: 17px 23px 12px;
}

.market-search {
  min-height: 44px;
  border-radius: 7px;
  background: #f5f7fa;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 0 14px;
  color: #8993a3;
}

.market-search input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
  color: #8d95a2;
  font-size: 15px;
}

.market-pin {
  border: 0;
  background: transparent;
  color: #657184;
  position: relative;
  font-size: 17px;
}

.market-pin span {
  position: absolute;
  right: 4px;
  top: 4px;
  width: 6px;
  height: 6px;
  background: #d64d5f;
  border-radius: 50%;
}

.market-main-tabs,
.market-filter-tabs {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 47px;
  padding: 0 23px;
  border-bottom: 1px solid #eef2f6;
  overflow: auto;
  white-space: nowrap;
}

.market-filter-tabs {
  min-height: 48px;
  gap: 19px;
}

.market-main-tabs button,
.market-filter-tabs button {
  border: 0;
  background: transparent;
  color: #7a8393;
  font-size: 16px;
  padding: 0;
  height: 47px;
  position: relative;
}

.market-main-tabs button.active,
.market-filter-tabs button.active {
  color: #151b28;
  font-weight: 600;
}

.market-main-tabs button.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: #111823;
  transform: translateX(-50%);
}

.market-filter-tabs .more {
  color: #171e2b;
  font-weight: 600;
  margin-left: auto;
}

.market-list-head {
  display: grid;
  grid-template-columns: 1.45fr 0.8fr 0.7fr;
  gap: 12px;
  padding: 15px 23px 8px;
  color: #7f8898;
  font-size: 13px;
}

.market-list-head span:nth-child(n + 2) {
  text-align: right;
}

.market-list {
  overflow: auto;
  padding-bottom: 18px;
}

.market-empty {
  padding: 28px 23px;
  color: #8a94a4;
  font-size: 14px;
}

.market-row {
  display: grid;
  grid-template-columns: 1.45fr 0.8fr 0.7fr;
  gap: 12px;
  align-items: center;
  min-height: 72px;
  padding: 0 23px;
  border: 0;
  background: #fff;
  width: 100%;
  cursor: pointer;
}

.market-row:hover {
  background: #f8fafc;
}

.market-row.active {
  background: #ffffff;
}

.pair-cell {
  display: grid;
  grid-template-columns: 24px 28px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.fav-star {
  color: #d7dde7;
  font-size: 20px;
  transform: translateY(-1px);
}

.coin-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  background: #0b0c0d url("./assets/xlm-icon.png") center / cover no-repeat !important;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16);
  font-size: 0;
  color: transparent !important;
}

.coin-eth {
  background: linear-gradient(135deg, #6f7df2, #5966dc);
}

.coin-btc {
  background: #f5a13b;
}

.coin-sol,
.coin-xrp,
.coin-lab {
  background: #0f1520;
}

.coin-xau {
  background: #d4aa43;
  color: #fff7d5;
  font-size: 10px;
}

.coin-doge {
  background: #d1be55;
}

.coin-xag {
  background: #c5cad4;
  color: #ffffff;
  font-size: 10px;
}

.coin-zec {
  background: #e0ae28;
}

.coin-ton {
  background: #5aaef4;
}

.coin-bsb {
  background: #efbfc8;
}

.pair-meta strong {
  display: block;
  color: #171d2b;
  font-size: 16px;
  line-height: 20px;
  font-weight: 600;
}

.pair-meta span {
  display: block;
  color: #8a94a4;
  font-size: 14px;
  line-height: 18px;
}

.market-price,
.market-change {
  font-size: 16px;
  font-weight: 600;
  text-align: right;
}

.market-price {
  color: #171d2b;
}

.market-change.up {
  color: #26a772;
}

.market-change.down {
  color: #d14d63;
}

.top-trade-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px 282px;
  grid-template-rows: 69px 596px;
  align-items: stretch;
}

.trade-shell {
  grid-column: 1 / 3;
  grid-row: 2;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  min-height: 596px;
}

.chart-panel,
.orderbook-panel,
.trade-form {
  border-top: 0;
}

.chart-panel {
  display: flex;
  flex-direction: column;
}

.tabs-row {
  min-height: 42px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  overflow: auto;
}

.tab {
  border: 0;
  background: transparent;
  color: #5f6878;
  font-size: 13px;
  white-space: nowrap;
  padding: 0;
  cursor: pointer;
}

.tab.active,
.tab.active-heavy {
  color: #121923;
  font-weight: 600;
}

.tab.active::after,
.tab.active-heavy::after {
  content: "";
  display: block;
  margin-top: 8px;
  height: 2px;
  width: 28px;
  background: #111823;
}

.tab.accent {
  color: #7422c8;
  font-weight: 500;
}

.toolbar-row {
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
}

.time-pills,
.tool-icons,
.chart-actions {
  display: flex;
  align-items: center;
  gap: 11px;
}

.time-pills button {
  border: 0;
  background: transparent;
  color: #6a7384;
  font-size: 11px;
  padding: 0;
}

.time-pills .active {
  color: #121a26;
  font-weight: 600;
}

.tool-icons span {
  width: 10px;
  height: 10px;
  border: 1px solid #8891a0;
  border-radius: 2px;
}

.chart-actions {
  margin-left: auto;
  gap: 14px;
  color: #677384;
  font-size: 11px;
}

.chart-actions button {
  border: 0;
  background: transparent;
  color: #5d6878;
  padding: 0;
  font-size: 14px;
  line-height: 1;
}

.chart-wrap {
  flex: 1;
  min-height: 420px;
  display: flex;
  min-width: 0;
}

.left-tools {
  width: 50px;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  background: #fbfcff;
}

.left-tools button {
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #717b8b;
  font-size: 18px;
  padding: 4px 0;
}

.left-tools button:hover {
  border-color: #e0e5ee;
  background: #f2f5fb;
}

.left-tools button.active {
  border-color: #cbd5e1;
  background: #eef2f7;
  color: #111823;
}

.chart-canvas {
  position: relative;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  background: #ffffff;
}

.ai-toast {
  position: absolute;
  left: 140px;
  top: 10px;
  z-index: 6;
  width: 328px;
  min-height: 52px;
  border-radius: 5px;
  background: rgba(24, 26, 32, 0.94);
  color: #aeb4bf;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 16px;
  pointer-events: none;
}

#tv-chart {
  position: absolute;
  inset: 0;
}

.chart-label {
  position: absolute;
  left: 12px;
  top: 8px;
  color: #4d5564;
  font-size: 33px;
  transform: scale(0.5);
  transform-origin: left top;
  z-index: 5;
  pointer-events: none;
}

.chart-sub {
  position: absolute;
  left: 12px;
  top: 24px;
  color: #cb4a5f;
  font-size: 12px;
  z-index: 5;
  pointer-events: none;
}

.candles {
  position: absolute;
  left: 0;
  right: 0;
  top: 44px;
  bottom: 62px;
  display: flex;
  align-items: flex-end;
  gap: 6px;
  padding: 0 14px;
}

.candle {
  position: relative;
  width: 8px;
}

.candle::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  width: 1px;
  top: var(--wick-top);
  height: var(--wick-height);
  background: var(--wick-color);
}

.candle i {
  position: absolute;
  left: 0;
  right: 0;
  top: var(--body-top);
  height: var(--body-height);
  background: var(--body-color);
  border-radius: 1px;
}

.volume {
  position: absolute;
  left: 12px;
  bottom: 38px;
  color: #7d8797;
  font-size: 12px;
  z-index: 5;
  pointer-events: none;
}

.volume span {
  color: #cb485f;
}

.chart-insight-panel {
  position: absolute;
  left: 84px;
  top: 64px;
  z-index: 7;
  display: grid;
  grid-template-columns: minmax(160px, 0.75fr) 1fr;
  gap: 12px;
  width: min(620px, calc(100% - 120px));
  max-height: calc(100% - 118px);
  padding: 10px 12px;
  border: 1px solid #e0e6ef;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 8px 22px rgba(32, 42, 58, 0.07);
  overflow: hidden;
}

.chart-insight-main {
  min-width: 0;
}

.chart-insight-kicker {
  margin-bottom: 4px;
  color: #828b9a;
  font-size: 11px;
}

.chart-insight-title {
  color: #172031;
  font-size: 16px;
  font-weight: 600;
  line-height: 20px;
}

.chart-insight-sub {
  margin-top: 8px;
  color: #6d7688;
  font-size: 11px;
  line-height: 16px;
}

.chart-insight-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  min-width: 0;
}

.chart-insight-item {
  min-width: 0;
  border-bottom: 1px solid #eef2f7;
  padding-bottom: 7px;
}

.chart-insight-item span {
  display: block;
  color: #838c9b;
  font-size: 10px;
  line-height: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chart-insight-item strong {
  display: block;
  margin-top: 3px;
  color: #1e293b;
  font-size: 12px;
  line-height: 15px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.assist-pill {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 8px;
  color: #355fb6;
  background: #eef4ff;
  border: 1px solid #b7ccff;
  border-radius: 999px;
  font-size: 28px;
  transform-origin: center;
  padding: 4px 16px;
  transform: translateX(-50%) scale(0.5);
  z-index: 5;
}

.mini-data-tabs {
  min-height: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 8px;
  color: #6f798a;
  font-size: 11px;
  white-space: nowrap;
  overflow: auto;
}

.orderbook-panel {
  display: flex;
  flex-direction: column;
}

.book-header {
  min-height: 40px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
}

.book-tabs {
  display: flex;
  align-items: center;
  gap: 12px;
}

.book-tabs button {
  border: 0;
  background: transparent;
  color: #6c7485;
  font-size: 13px;
  padding: 0;
}

.book-tabs .active {
  color: #121924;
  font-weight: 600;
}

.book-tools {
  display: flex;
  align-items: center;
  gap: 9px;
}

.depth-mode {
  width: 15px;
  height: 15px;
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.depth-mode::before,
.depth-mode::after {
  content: "";
  border-radius: 1px;
}

.mode-both::before,
.mode-bid::before {
  background: #1a8a65;
}

.mode-both::after,
.mode-ask::after {
  background: #c95566;
}

.mode-bid::after,
.mode-ask::before {
  background: #d8dde6;
}

.book-depth {
  color: #1f2938;
  font-size: 12px;
}

.book-body {
  height: 100%;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
}

.book-column-head {
  display: grid;
  grid-template-columns: 0.9fr 0.88fr 0.9fr;
  gap: 6px;
  color: #8a93a2;
  font-size: 11px;
  line-height: 18px;
  margin-bottom: 3px;
}

.book-column-head span:nth-child(n + 2) {
  text-align: right;
}

.book-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.book-row {
  position: relative;
  display: grid;
  grid-template-columns: 0.9fr 0.88fr 0.9fr;
  gap: 6px;
  font-size: 11px;
  line-height: 17px;
  z-index: 1;
  cursor: pointer;
}

.book-row span:nth-child(n + 2) {
  text-align: right;
}

.book-row::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: var(--fill);
  z-index: -1;
  opacity: 0.37;
}

.asks .book-row {
  color: var(--red);
}

.asks .book-row::before {
  background: #f9e1e6;
}

.bids .book-row {
  color: var(--green);
}

.bids .book-row::before {
  background: #e2f1e8;
}

.mid-price {
  margin: 6px 0;
  text-align: left;
  color: var(--green);
  font-weight: 600;
  font-size: 14px;
  line-height: 22px;
}

.trade-form {
  grid-column: 3;
  grid-row: 1 / 3;
  min-height: 665px;
  padding: 10px 15px;
  display: flex;
  flex-direction: column;
}

.form-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.selector {
  border: 0;
  background: transparent;
  color: #121923;
  font-size: 14px;
  padding: 0;
}

.form-icon {
  border: 0;
  background: transparent;
  color: #778292;
  font-size: 16px;
  padding: 0;
  line-height: 1;
}

.form-icon:first-of-type {
  margin-left: auto;
}

.form-tabs {
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 14px;
  margin-bottom: 11px;
}

.form-tabs button {
  border: 0;
  background: transparent;
  color: #6f7888;
  font-size: 14px;
  padding: 0 0 7px;
}

.form-tabs .active {
  color: #121924;
  font-weight: 600;
  border-bottom: 2px solid #121924;
}

.field-group {
  margin-bottom: 10px;
}

.field-group label {
  display: block;
  color: #7a8394;
  font-size: 11px;
  margin-bottom: 5px;
}

.field-box {
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  font-size: 13px;
  gap: 8px;
}

.field-box .last-token {
  color: #1555d6;
}

.bbo-token {
  border: 0;
  background: #eef2f7;
  color: #151b28;
  border-radius: 4px;
  min-height: 28px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 600;
}

.field-box.muted {
  color: #566071;
}

.input-wrap input {
  border: 0;
  outline: 0;
  width: 100%;
  background: transparent;
  color: #141c29;
  font-size: 13px;
  font-weight: 500;
}

.input-wrap span {
  font-size: 12px;
  white-space: nowrap;
}

.quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 9px;
}

.quick-amounts button {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafd;
  color: #657082;
  font-size: 11px;
  min-height: 28px;
  cursor: pointer;
}

.quick-amounts button:hover {
  border-color: #c6cfde;
  color: #22314a;
}

.slider {
  height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #ccd4e1, #eceff4);
  margin-bottom: 10px;
}

.available {
  color: #768092;
  font-size: 12px;
  margin-bottom: 9px;
}

.available strong {
  color: #1a222f;
}

.mini-rows {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #6f7a8d;
  font-size: 11px;
  margin-bottom: 10px;
}

.mini-rows strong {
  color: #1b2433;
}

.checks {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 11px;
  color: #5f6879;
  font-size: 12px;
}

.checks label {
  display: flex;
  align-items: center;
  gap: 5px;
}

.cta {
  border: 0;
  border-radius: 999px;
  min-height: 40px;
  margin-bottom: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.cta.buy {
  color: #fff;
  background: #13774f;
}

.cta.sell {
  color: #fff;
  background: #cb4e64;
}

.cta.login-like {
  border: 0;
  background: #167a50;
  color: #ffffff;
  font-weight: 600;
}

.cta.signup-like {
  border: 0;
  background: #edf1f6;
  color: #1f2938;
  font-weight: 500;
}

.max-bounds {
  display: flex;
  justify-content: space-between;
  color: #747f91;
  font-size: 12px;
  margin: 4px 0 12px;
}

.trading-status-card {
  margin-top: auto;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 6px 10px;
  color: #6f7b8f;
  background: #f8fafd;
  font-size: 12px;
  text-align: center;
  cursor: pointer;
  user-select: none;
}

.points-card {
  min-height: 40px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #96cf38;
  font-size: 14px;
  font-style: italic;
  font-weight: 700;
  text-align: left;
  background: #ffffff;
}

.points-card span {
  position: relative;
  padding-left: 18px;
}

.points-card span::before {
  content: "✥";
  position: absolute;
  left: 0;
  top: -1px;
  color: #9ad145;
  font-style: normal;
}

.points-card i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #da4054;
  align-self: flex-start;
  margin-top: 7px;
  margin-left: 3px;
}

.points-card b {
  margin-left: auto;
  color: #8c95a5;
  font-size: 21px;
  font-style: normal;
  font-weight: 400;
  line-height: 1;
}

.ticker-strip {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 26;
  min-height: 25px;
  border-top: 1px solid var(--line);
  border-bottom: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 8px;
  background: #ffffff;
  color: #5e6878;
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
}

.ticker-strip .hot {
  color: #e14f62;
}

.ticker-strip button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  padding: 0;
  cursor: pointer;
}

.ticker-strip button:hover {
  color: #151b28;
}

.ticker-spacer {
  flex: 1;
}

.bottom-shell {
  display: grid;
  grid-template-columns: 1fr 280px;
  min-height: 280px;
  flex: 1;
}

.positions,
.assets {
  border-top: 1px solid var(--line);
}

.assets {
  border-left: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.bottom-tabs {
  min-height: 38px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 10px;
  overflow: auto;
}

.bottom-tabs button {
  border: 0;
  background: transparent;
  color: #6a7382;
  font-size: 12px;
  width: max-content;
  padding: 0;
  white-space: nowrap;
}

.bottom-tabs .active {
  color: #121923;
  font-weight: 600;
  border-bottom: 2px solid #121923;
}

.bottom-table-wrap {
  position: relative;
  min-height: 240px;
}

.bottom-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.bottom-table thead th {
  text-align: left;
  color: #7a8495;
  font-weight: 500;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  background: #fbfcff;
}

.bottom-table tbody td {
  padding: 10px;
  border-bottom: 1px solid #eef1f6;
  color: #222c3d;
}

.bottom-table tbody tr:hover td {
  background: #fafcff;
}

.table-action-btn {
  border: 1px solid #d5dcea;
  border-radius: 4px;
  background: #fff;
  color: #4a556a;
  font-size: 10px;
  min-height: 22px;
  padding: 0 8px;
  cursor: pointer;
}

.table-action-btn:hover {
  border-color: #b8c4db;
  color: #263246;
}

.pnl-pos {
  color: #0f875e !important;
}

.pnl-neg {
  color: #c84a62 !important;
}

.side-buy {
  color: #0f875e;
  font-weight: 600;
}

.side-sell {
  color: #c84a62;
  font-weight: 600;
}

.bottom-empty {
  min-height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #626d7f;
  font-size: 13px;
}

.live-empty {
  color: #7a8391;
  font-size: 13px;
  padding: 0 14px;
  text-align: center;
}

.live-empty-message {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.live-empty-message strong {
  color: #111722;
  font-weight: 600;
}

.assets .live-empty {
  font-size: 12px;
  min-height: 198px;
}

.hidden {
  display: none !important;
}

.assets h3 {
  margin: 10px 12px;
  font-size: 14px;
}

.asset-cards {
  padding: 4px 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.asset-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: #6c778a;
  font-size: 11px;
}

.asset-row strong {
  color: #192333;
  font-size: 12px;
}

.announcements-card {
  position: absolute;
  left: 0;
  right: 0;
  top: 64px;
  min-height: 154px;
  background: #fff;
  border-top: 1px solid var(--line);
  padding: 18px 12px 12px;
  box-shadow: 0 -10px 28px rgba(25, 34, 48, 0.04);
}

.announcements-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.announcements-head strong {
  color: #151b28;
  font-size: 18px;
  font-weight: 600;
}

.announcements-head button {
  border: 0;
  background: transparent;
  color: #818a99;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.announcements-card p {
  margin: 0;
  color: #1f2735;
  font-size: 14px;
  line-height: 20px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-trade-actions {
  display: none;
}

@media (max-width: 1100px) {
  .top-trade-grid {
    display: block;
  }

  .trade-shell {
    grid-template-columns: 1fr;
  }

  .orderbook-panel,
  .trade-form {
    min-height: 280px;
  }

  .trade-form {
    min-height: 320px;
  }

  .bottom-shell {
    grid-template-columns: 1fr;
  }

  .assets {
    border-left: 0;
    border-top: 0;
  }
}

@media (max-width: 760px) {
  html,
  body,
  .app-shell {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .top-nav {
    padding: 0 10px;
    height: 60px;
    min-height: 60px;
  }

  .logo-link {
    width: 132px;
    min-width: 132px;
    height: 60px;
  }

  .logo-icon {
    height: 34px;
    width: 132px;
    object-fit: cover;
    object-position: center;
  }

  .primary-nav,
  .log-link,
  .icon-btn[aria-label="Download"],
  .icon-btn[aria-label="Settings"] {
    display: none;
  }

  .apps-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #20262f;
    color: #aeb7c5;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    font-size: 19px;
  }

  .desktop-apps {
    display: none;
  }

  .mobile-menu {
    display: inline;
  }

  .signup-btn {
    background: #0f4eb8;
    color: #fff;
    min-height: 38px;
    border-radius: 20px;
    padding: 0 17px;
  }

  .stellar-connect-btn {
    max-width: 144px;
    padding: 0 13px;
  }

  .wallet-disconnect-btn {
    display: none;
  }

  .market-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(160px, 1fr);
    gap: 10px;
    height: auto;
    min-height: 198px;
    padding: 15px 20px;
    overflow: visible;
  }

  .market-selector {
    top: 60px;
    right: 0;
    bottom: 0;
    width: 100%;
    min-width: 0;
    z-index: 40;
    border-top: 1px solid #eef2f6;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
    background: #ffffff;
  }

  .market-search-row {
    padding: 12px 14px 10px;
  }

  .market-main-tabs,
  .market-filter-tabs {
    gap: 18px;
    padding: 0 14px;
  }

  .market-main-tabs button,
  .market-filter-tabs button {
    font-size: 14px;
  }

  .market-list-head {
    padding: 12px 14px 8px;
    font-size: 12px;
  }

  .market-row {
    min-height: 64px;
    padding: 0 14px;
    gap: 8px;
    grid-template-columns: minmax(0, 1.45fr) 0.72fr 0.58fr;
  }

  .pair-cell {
    grid-template-columns: 20px 26px minmax(0, 1fr);
    gap: 9px;
  }

  .coin-dot {
    width: 26px;
    height: 26px;
  }

  .pair-meta strong {
    font-size: 14px;
  }

  .pair-meta span,
  .market-price,
  .market-change {
    font-size: 12px;
  }

  .pair-box {
    grid-column: 1 / -1;
    min-width: 0;
    width: 100%;
  }

  .price-block {
    grid-column: 1;
    min-width: 0;
    width: auto;
    align-self: start;
  }

  .market-points {
    display: inline-flex;
  }

  .badge-contract,
  .badge-muted,
  .pair-desktop-name {
    display: none;
  }

  .pair-mobile-contract {
    display: inline;
  }

  .info-dot {
    color: #6c7482;
    font-size: 7px;
    vertical-align: middle;
  }

  .change-abs,
  .change-pct {
    display: none;
  }

  .change-pct-mobile {
    display: inline;
  }

  .stat-grid {
    grid-column: 2;
    width: 100%;
    grid-template-columns: 1fr;
    align-self: start;
    gap: 1px;
  }

  .stat-index {
    display: none !important;
  }

  .mobile-stat {
    display: grid;
  }

  .stat-high {
    order: 1;
  }

  .stat-low {
    order: 2;
  }

  .stat-mark {
    order: 3;
  }

  .stat-turnover {
    order: 4;
  }

  .stat-funding {
    order: 5;
  }

  .stat-item {
    display: grid;
    grid-template-columns: 118px minmax(0, 1fr);
    align-items: baseline;
    gap: 4px;
    padding: 0;
    border-left: 0;
    line-height: 16px;
  }

  .stat-item span {
    font-size: 12px;
  }

  .stat-item strong {
    margin-top: 0;
    font-size: 11px;
    text-align: left;
    white-space: nowrap;
  }

  .stat-item:nth-child(3) strong {
    line-height: 13px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .mobile-trade-actions {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 25;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    min-height: 82px;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #ffffff;
    border-top: 1px solid #e7ebf2;
  }

  .mobile-trade-actions button {
    border: 0;
    border-radius: 999px;
    min-height: 42px;
    font-size: 14px;
    font-weight: 500;
  }

  .mobile-login-action {
    background: #13774f;
    color: #ffffff;
  }

  .mobile-signup-action {
    background: #edf1f6;
    color: #151b28;
  }

  body {
    padding-bottom: 82px;
  }

  .top-trade-grid,
  .trade-shell,
  .chart-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .chart-panel {
    overflow: hidden;
  }

  .tabs-row,
  .toolbar-row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
  }

  .tabs-row::-webkit-scrollbar,
  .toolbar-row::-webkit-scrollbar {
    display: none;
  }

  .toolbar-row {
    justify-content: flex-start;
    gap: 14px;
  }

  .tool-icons {
    flex: 0 0 auto;
  }

  .chart-actions {
    flex: 0 0 auto;
    margin-left: 0;
  }

  .chart-wrap {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 360px;
  }

  .left-tools {
    flex: 0 0 50px;
  }

  .chart-canvas,
  #tv-chart {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .ai-toast {
    left: 104px;
    width: min(268px, calc(100vw - 122px));
  }

  .chart-insight-panel {
    left: 58px;
    right: 8px;
    width: auto;
    top: 58px;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px;
    max-height: calc(100% - 98px);
    overflow: auto;
  }

  .chart-insight-grid {
    grid-template-columns: 1fr;
  }

  .orderbook-panel,
  .trade-form,
  .ticker-strip,
  .assets {
    display: none;
  }

  .positions .bottom-tabs {
    justify-content: center;
  }

  .positions .bottom-tabs button:not(.active) {
    display: none;
  }

  .bottom-empty {
    min-height: 120px;
    font-size: 14px;
  }

}
