/* Ensure flex children can shrink */
.game-app { overflow: hidden; }

/* Premium dashboard extras — pairs, news, history, ranks, profile, theme */

body.theme-light {
  --bg: #f3f7f0;
  --bg-secondary: #ffffff;
  --navy: #e8f0e4;
  --text: #142018;
  --text-muted: #5a6f5c;
  --sheet-scrim: rgba(10, 24, 12, 0.45);
}

body.theme-light .game-header,
body.theme-light .trade-panel,
body.theme-light .game-footer {
  border-color: rgba(40, 90, 40, 0.12);
}

body.theme-light .chart-wrapper {
  background: linear-gradient(180deg, #ffffff 0%, #eef5ea 100%);
  border-color: rgba(40, 90, 40, 0.14);
}

body.theme-light .news-ticker {
  background: rgba(255, 255, 255, 0.85);
  border-color: rgba(40, 90, 40, 0.12);
}

/* News ticker */
.news-ticker {
  flex-shrink: 0;
  overflow: hidden;
  border-bottom: 1px solid rgba(141, 198, 63, 0.16);
  background: linear-gradient(90deg, rgba(18, 36, 20, 0.95), rgba(11, 26, 10, 0.9));
  height: 34px;
  display: flex;
  align-items: center;
  position: relative;
}

.news-ticker::before,
.news-ticker::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: 36px;
  z-index: 2;
  pointer-events: none;
}

.news-ticker::before {
  left: 0;
  background: linear-gradient(90deg, var(--bg), transparent);
}

.news-ticker::after {
  right: 0;
  background: linear-gradient(270deg, var(--bg), transparent);
}

.news-track {
  display: flex;
  gap: 2.5rem;
  white-space: nowrap;
  animation: newsScroll 55s linear infinite;
  padding-left: 100%;
}

.news-item {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

.news-item em {
  font-style: normal;
  font-weight: 700;
  color: var(--gold);
  margin-right: 0.45rem;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
}

@keyframes newsScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* Pair bar */
.pair-bar {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  padding: 0.55rem 0.85rem 0.35rem;
  flex-shrink: 0;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.pair-bar::-webkit-scrollbar { display: none; }

.pair-chip {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.1rem;
  padding: 0.45rem 0.7rem;
  border-radius: 12px;
  border: 1px solid rgba(141, 198, 63, 0.18);
  background: rgba(8, 18, 8, 0.35);
  color: var(--text);
  cursor: pointer;
  min-width: 92px;
  transition: border-color 0.2s, transform 0.15s, background 0.2s, box-shadow 0.2s;
}

body.theme-light .pair-chip {
  background: rgba(255, 255, 255, 0.9);
}

.pair-chip:active { transform: scale(0.97); }

.pair-chip.active {
  border-color: var(--pair, var(--gold));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--pair, var(--gold)) 35%, transparent),
    0 8px 18px rgba(0, 0, 0, 0.18);
  background: linear-gradient(160deg, rgba(141, 198, 63, 0.16), rgba(0, 0, 0, 0.12));
}

.pair-sym {
  font-family: 'Sora', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.pair-name {
  font-size: 0.62rem;
  color: var(--text-muted);
}

/* Header extras */
.theme-btn,
.dock-btn {
  border: 1px solid rgba(141, 198, 63, 0.25);
  background: rgba(8, 18, 8, 0.35);
  color: var(--text);
  border-radius: 10px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.theme-btn .theme-ico { font-size: 0.95rem; line-height: 1; }

.wallet-fab {
  display: none !important;
}

/* Bottom dock */
.dash-dock {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.2rem;
  padding: 0.3rem 0.4rem calc(0.4rem + var(--safe-bottom));
  border-top: 1px solid rgba(141, 198, 63, 0.16);
  background: linear-gradient(0deg, var(--navy), var(--bg-secondary));
}

.dash-dock button.active-dock {
  color: var(--gold);
  background: rgba(141, 198, 63, 0.12);
}

.dash-dock button {
  border: 0;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.35rem 0.2rem;
  font-size: 0.68rem;
  font-weight: 600;
  cursor: pointer;
  border-radius: 12px;
}

.dash-dock button span.ico {
  font-size: 1.05rem;
  line-height: 1;
}

.dash-dock button:active,
.dash-dock button:focus-visible {
  color: var(--gold);
  background: rgba(141, 198, 63, 0.1);
}

/* Sheet */
.dash-sheet {
  position: fixed;
  inset: 0;
  z-index: 7600;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: var(--sheet-scrim, rgba(0, 0, 0, 0.55));
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.dash-sheet.open {
  opacity: 1;
  visibility: visible;
}

.dash-panel {
  width: 100%;
  max-width: 520px;
  max-height: min(88vh, 720px);
  background:
    radial-gradient(ellipse 80% 40% at 50% 0%, rgba(141, 198, 63, 0.18), transparent 55%),
    linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg) 100%);
  border-radius: 22px 22px 0 0;
  border: 1px solid rgba(141, 198, 63, 0.22);
  border-bottom: 0;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  transform: translateY(24px);
  transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  overflow: hidden;
}

.dash-sheet.open .dash-panel {
  transform: translateY(0);
}

.dash-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.1rem 0.75rem;
  border-bottom: 1px solid rgba(141, 198, 63, 0.14);
}

.dash-head h2 {
  font-family: 'Sora', sans-serif;
  font-size: 1.05rem;
  font-weight: 700;
}

.dash-close {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(141, 198, 63, 0.25);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.dash-body {
  overflow: auto;
  padding: 0.9rem 1rem 1.4rem;
  -webkit-overflow-scrolling: touch;
}

.dash-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--text-muted);
}

.dash-empty-ico { font-size: 2rem; margin-bottom: 0.6rem; }
.dash-empty h3 { color: var(--text); margin-bottom: 0.35rem; }

/* History */
.hist-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.hist-summary-rich {
  grid-template-columns: repeat(3, 1fr);
}

.hist-summary > div {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(141, 198, 63, 0.14);
  border-radius: 14px;
  padding: 0.7rem 0.55rem;
  text-align: center;
}

body.theme-light .hist-summary > div {
  background: rgba(255, 255, 255, 0.85);
}

.hist-summary span {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.hist-summary strong {
  font-family: 'Sora', sans-serif;
  font-size: 0.92rem;
}

.hist-filters {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.hist-filter {
  border: 1px solid rgba(141, 198, 63, 0.22);
  background: rgba(0, 0, 0, 0.2);
  color: var(--text-muted);
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
}

.hist-filter.active {
  background: rgba(141, 198, 63, 0.18);
  color: var(--gold);
  border-color: rgba(141, 198, 63, 0.45);
}

.hist-list { display: flex; flex-direction: column; gap: 0.55rem; }

.hist-card {
  border-radius: 14px;
  padding: 0;
  border: 1px solid rgba(141, 198, 63, 0.14);
  background: rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.hist-card.win { border-left: 3px solid var(--green); }
.hist-card.loss { border-left: 3px solid var(--red); }

.hist-card-main {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  padding: 0.75rem 0.85rem;
  cursor: pointer;
}

.hist-top {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.35rem;
  flex-wrap: wrap;
}

.hist-pair {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
}

.hist-dir {
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 999px;
  background: rgba(141, 198, 63, 0.15);
  color: var(--gold);
}

.hist-dir.sell {
  background: rgba(255, 77, 77, 0.15);
  color: #ff8a8a;
}

.hist-status {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.hist-status.win { background: rgba(141, 198, 63, 0.15); color: #8dc63f; }
.hist-status.loss { background: rgba(255, 77, 77, 0.15); color: #ff8a8a; }
.hist-status.liq { background: rgba(255, 183, 77, 0.18); color: #ffb74d; }

.hist-pnl {
  margin-left: auto;
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.88rem;
}

.hist-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  font-size: 0.7rem;
  color: var(--text-muted);
  align-items: center;
}

.hist-chevron {
  margin-left: auto;
  opacity: 0.7;
  transition: transform 0.2s ease;
}

.hist-card.expanded .hist-chevron {
  transform: rotate(180deg);
}

.hist-detail {
  padding: 0 0.85rem 0.85rem;
  border-top: 1px solid rgba(141, 198, 63, 0.1);
}

.hist-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  padding-top: 0.75rem;
}

.hist-grid > div {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(141, 198, 63, 0.1);
  border-radius: 10px;
  padding: 0.5rem 0.55rem;
}

.hist-grid span {
  display: block;
  font-size: 0.62rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.2rem;
}

.hist-grid strong {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  word-break: break-word;
}

@media (min-width: 520px) {
  .hist-summary-rich { grid-template-columns: repeat(3, 1fr); }
  .hist-grid { grid-template-columns: repeat(3, 1fr); }
}

.up { color: var(--green) !important; }
.down { color: var(--red) !important; }

/* Leaderboard */
.rank-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.95rem 1rem;
  border-radius: 16px;
  margin-bottom: 0.85rem;
  background: linear-gradient(135deg, rgba(141, 198, 63, 0.22), rgba(0, 0, 0, 0.25));
  border: 1px solid rgba(141, 198, 63, 0.28);
}

.rank-label {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.rank-num {
  font-family: 'Sora', sans-serif;
  font-size: 1.6rem;
  color: var(--gold);
}

.rank-you-pnl {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 1rem;
}

.rank-list { display: flex; flex-direction: column; gap: 0.45rem; }

.rank-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.7rem 0.8rem;
  border-radius: 14px;
  border: 1px solid rgba(141, 198, 63, 0.12);
  background: rgba(0, 0, 0, 0.18);
}

.rank-card.you {
  border-color: rgba(141, 198, 63, 0.45);
  box-shadow: 0 0 0 1px rgba(141, 198, 63, 0.15);
}

.rank-card.podium {
  background: linear-gradient(120deg, rgba(141, 198, 63, 0.12), rgba(0, 0, 0, 0.15));
}

.rank-left {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.rank-medal {
  width: 2rem;
  text-align: center;
  font-weight: 700;
  font-family: 'Sora', sans-serif;
  color: var(--gold);
  flex-shrink: 0;
}

.rank-left strong {
  display: block;
  font-size: 0.88rem;
}

.rank-left span {
  display: block;
  font-size: 0.68rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.rank-pnl {
  font-family: 'Sora', sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
  white-space: nowrap;
}

.rank-note {
  margin-top: 0.85rem;
  text-align: center;
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* Profile */
.profile-hero {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
}

.profile-avatar {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-family: 'Sora', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: #0b1a0a;
  background: linear-gradient(145deg, #c6e86a, #8dc63f 55%, #6faa28);
  box-shadow: 0 10px 24px rgba(141, 198, 63, 0.28);
}

.profile-id h3 {
  font-family: 'Sora', sans-serif;
  font-size: 1.15rem;
  margin-bottom: 0.15rem;
}

.profile-id p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.kyc-pill {
  display: inline-flex;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.kyc-pill.ok { background: rgba(141, 198, 63, 0.2); color: var(--green); }
.kyc-pill.wait { background: rgba(212, 175, 55, 0.2); color: #d4af37; }
.kyc-pill.no { background: rgba(255, 77, 77, 0.15); color: #ff8a8a; }

.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.profile-stat {
  background: rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(141, 198, 63, 0.12);
  border-radius: 14px;
  padding: 0.7rem 0.75rem;
}

.profile-stat.wide { grid-column: 1 / -1; }

.profile-stat span {
  display: block;
  font-size: 0.65rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.25rem;
}

.profile-stat strong {
  font-family: 'Sora', sans-serif;
  font-size: 0.92rem;
}

.profile-kyc {
  border-radius: 16px;
  padding: 1rem;
  border: 1px solid rgba(141, 198, 63, 0.18);
  background: linear-gradient(160deg, rgba(141, 198, 63, 0.1), rgba(0, 0, 0, 0.15));
}

.profile-kyc h4 {
  font-family: 'Sora', sans-serif;
  margin-bottom: 0.3rem;
}

.profile-kyc p {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-bottom: 0.8rem;
  line-height: 1.45;
}

.dash-cta {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  background: linear-gradient(135deg, #a7d44a, #6faa28);
  color: #0b1a0a;
}

.dash-ghost {
  width: 100%;
  margin-top: 0.45rem;
  border: 1px solid rgba(141, 198, 63, 0.3);
  background: transparent;
  color: var(--text-muted);
  border-radius: 12px;
  padding: 0.7rem;
  cursor: pointer;
}

.kyc-done {
  font-weight: 700;
  color: var(--green);
}

/* Layout fix — keep chart visible on mobile */
.header-brand-img {
  display: none !important;
}

.game-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  flex-wrap: nowrap !important;
  gap: 0.45rem;
  padding: 0.4rem 0.65rem !important;
  padding-top: calc(0.4rem + env(safe-area-inset-top, 0px)) !important;
  min-height: 52px;
}

.header-left {
  flex: 0 0 auto !important;
}

.header-center {
  flex: 1 1 auto !important;
  min-width: 0;
  text-align: left !important;
  padding-left: 0.15rem;
}

.header-right {
  flex: 0 0 auto !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 0.4rem !important;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-shrink: 0;
}

.header-brand-mark {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
}

.platform-name {
  font-size: 0.92rem !important;
  letter-spacing: 0.5px !important;
  white-space: nowrap;
  line-height: 1.15;
}

.platform-sub {
  font-size: 0.62rem !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.balance-wrap {
  align-items: flex-end;
  flex-shrink: 0;
  cursor: pointer;
  margin-top: 16px;
  padding-top: 4px;
}

.balance-label {
  font-size: 0.55rem !important;
}

.balance-value {
  font-size: 0.78rem !important;
  white-space: nowrap;
  line-height: 1.2;
}

.theme-btn,
.sound-btn,
.logout-btn {
  width: 32px !important;
  height: 32px !important;
  min-width: 32px;
  flex-shrink: 0;
}

.news-ticker {
  height: 26px !important;
}

.news-item {
  font-size: 0.66rem !important;
}

.pair-bar {
  padding: 0.35rem 0.65rem 0.2rem !important;
  gap: 0.35rem !important;
}

.pair-chip {
  padding: 0.32rem 0.55rem !important;
  min-width: 78px !important;
  border-radius: 10px !important;
}

.pair-sym {
  font-size: 0.72rem !important;
}

.pair-name {
  font-size: 0.58rem !important;
}

/* Candle / chart types restored — compact */
.chart-style-bar {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  height: auto !important;
  min-height: 36px !important;
  margin-bottom: 0.25rem !important;
  overflow: visible !important;
  position: relative;
  z-index: 5;
}

.chart-style-picker {
  display: flex !important;
  gap: 0.3rem !important;
  overflow-x: auto;
  padding: 0.1rem 0.1rem 0.25rem !important;
  scrollbar-width: none;
}

.chart-style-picker::-webkit-scrollbar { display: none; }

.style-btn {
  flex-shrink: 0 !important;
  padding: 0.28rem 0.5rem !important;
  font-size: 0.62rem !important;
  border-radius: 999px !important;
  gap: 0.22rem !important;
}

.style-btn .style-icon {
  font-size: 0.7rem !important;
}

/* Chart fills first screen with Buy/Sell visible; scroll only for positions */
.game-main-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
  --trade-chrome: 200px;
}

.chart-section {
  flex: 1 0 auto !important;
  display: flex !important;
  flex-direction: column !important;
  min-height: calc(100% - var(--trade-chrome)) !important;
  padding: 0.25rem 0.65rem 0.15rem !important;
}

.chart-header {
  padding: 0.2rem 0.15rem !important;
  margin-bottom: 0.1rem !important;
  flex-shrink: 0;
}

.live-price {
  font-size: 1.15rem !important;
}

.asset-name {
  font-size: 0.82rem !important;
}

.chart-style-bar {
  flex-shrink: 0;
}

.chart-wrapper {
  flex: 1 1 auto !important;
  height: auto !important;
  min-height: 180px !important;
}

.trade-panel {
  flex: 0 0 auto !important;
  padding: 0.55rem 0.75rem calc(0.55rem + var(--safe-bottom, 0px)) !important;
  max-height: none !important;
  overflow: visible !important;
}

.trade-panel.has-position .investment-section {
  opacity: 1 !important;
}

.open-positions-list {
  margin-top: 0.55rem;
  padding-top: 0.35rem;
  border-top: 1px solid rgba(141, 198, 63, 0.18);
}

.open-pos-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.4rem;
  font-size: 0.68rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.open-pos-head strong {
  color: var(--gold);
  font-family: 'Sora', sans-serif;
}

.open-pos-scroll {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  max-height: none;
  overflow: visible;
  padding-bottom: 0.85rem;
}

.open-pos-card {
  border: 1px solid rgba(141, 198, 63, 0.2);
  border-radius: 12px;
  padding: 0.55rem 0.6rem;
  background: rgba(0, 0, 0, 0.22);
  position: relative;
}

.open-pos-card.up { border-left: 3px solid var(--green); }
.open-pos-card.down { border-left: 3px solid var(--red); }

.open-pos-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 0.3rem;
}

.open-pos-dir {
  font-size: 0.62rem;
  font-weight: 700;
  padding: 0.12rem 0.4rem;
  border-radius: 999px;
}

.open-pos-dir.buy {
  background: rgba(141, 198, 63, 0.18);
  color: #8dc63f;
}

.open-pos-dir.sell {
  background: rgba(255, 77, 77, 0.18);
  color: #ff8a8a;
}

.open-pos-pair {
  font-family: 'Sora', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
}

.open-pos-lev {
  font-size: 0.62rem;
  color: var(--text-muted);
}

.open-pos-pnl {
  margin-left: auto;
  font-family: 'Sora', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
}

.open-pos-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.open-pos-close {
  width: 100%;
  border: 1px solid rgba(255, 77, 77, 0.35);
  background: rgba(255, 77, 77, 0.12);
  color: #ffb4b4;
  border-radius: 8px;
  padding: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.open-pos-close:active {
  background: rgba(255, 77, 77, 0.25);
}

.wallet-quick {
  display: none !important;
}

.investment-section {
  margin-bottom: 0.45rem !important;
}

.section-label {
  font-size: 0.65rem !important;
  margin-bottom: 0.3rem !important;
}

.quick-btn {
  padding: 0.35rem 0.55rem !important;
  font-size: 0.7rem !important;
}

.custom-input-wrap {
  margin-top: 0.35rem !important;
}

.investment-input {
  padding: 0.55rem 0.7rem !important;
  font-size: 0.9rem !important;
}

.trade-buttons {
  gap: 0.5rem !important;
  margin-top: 0.35rem !important;
}

.trade-btn {
  padding: 0.75rem 0.5rem !important;
  min-height: 48px !important;
}

.trade-hint {
  margin-top: 0.35rem !important;
  font-size: 0.62rem !important;
}

.dash-dock {
  padding: 0.3rem 0.4rem calc(0.4rem + var(--safe-bottom)) !important;
  grid-template-columns: repeat(4, 1fr) !important;
}

.dash-dock button {
  padding: 0.25rem 0.1rem !important;
  font-size: 0.6rem !important;
}

.dash-dock button span.ico {
  font-size: 0.95rem !important;
}

.wallet-quick {
  display: none !important;
}

.close-position-btn {
  margin-top: 0.35rem !important;
  padding: 0.55rem !important;
}

@media (max-height: 700px) {
  .pair-name { display: none !important; }
  .game-main-scroll { --trade-chrome: 185px; }
  .chart-wrapper { min-height: 140px !important; }
}

@media (min-height: 780px) {
  .chart-wrapper { min-height: 220px !important; }
}
@media (max-width: 420px) {
  .platform-name { font-size: 0.92rem; letter-spacing: 1px; }
  .header-brand-img,
  .header-brand-mark { width: 34px; height: 34px; border-radius: 8px; }
  .balance-label { display: none; }
}
