.rush-apex-surfer-art {
  background:
    radial-gradient(ellipse at 72% 27%, rgba(112, 233, 255, .22), transparent 31%),
    radial-gradient(ellipse at 18% 94%, rgba(128, 68, 255, .28), transparent 48%),
    linear-gradient(152deg, #111a2b, #10131d 55%, #181229);
}

.rush-apex-surfer-art::before {
  position: absolute;
  inset: 18% 11% 17%;
  border: 1px solid rgba(112, 233, 255, .24);
  border-radius: 13px;
  background: repeating-linear-gradient(0deg, transparent 0 20px, rgba(168, 184, 228, .07) 21px 22px), repeating-linear-gradient(90deg, transparent 0 28px, rgba(168, 184, 228, .07) 29px 30px);
  content: "";
  transform: perspective(160px) rotateX(12deg) skewY(-8deg);
}

.rush-apex-surfer-art::after {
  position: absolute;
  right: 11%;
  bottom: 14%;
  color: #69e9e3;
  content: "⌁";
  font-size: clamp(54px, 12vw, 84px);
  font-weight: 500;
  line-height: .7;
  text-shadow: 0 8px 25px rgba(34, 220, 207, .34);
}

.rush-apex-surfer-art .rush-game-art-label small { color: #9ce9e5; }

.rush-apex-dialog {
  box-sizing: border-box;
  width: min(940px, calc(100vw - 32px));
  max-width: 100%;
  max-height: min(940px, calc(100dvh - 32px));
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(160, 195, 255, .14);
  border-radius: 24px;
  background: radial-gradient(ellipse at 88% -8%, rgba(42, 190, 194, .14), transparent 34%), #0d1118;
  color: #f1f6ff;
  box-shadow: 0 32px 110px rgba(0, 0, 0, .68);
  font-family: inherit;
}

.rush-apex-dialog::backdrop { background: rgba(3, 5, 10, .76); backdrop-filter: blur(6px); }
.rush-apex-dialog[open] { animation: apex-dialog-in 170ms ease-out both; }
.rush-apex-dialog [hidden] { display: none !important; }

.rush-apex-stage {
  box-sizing: border-box;
  max-height: min(940px, calc(100dvh - 32px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 18px clamp(16px, 3vw, 28px) 24px;
  scrollbar-color: #344051 transparent;
}

/* Apex lives on its own screen just like the rest of Rush. */
.rush-apex-dialog[open] { position: fixed; inset: 0; width: 100vw; height: 100dvh; max-width: none; max-height: none; margin: 0; border: 0; border-radius: 0; box-shadow: none; }
.rush-apex-dialog[open]::backdrop { background: #0d1118; backdrop-filter: none; }
.rush-apex-dialog[open] .rush-apex-stage { width: min(960px, 100%); min-height: 100dvh; max-height: none; margin: 0 auto; background: radial-gradient(ellipse at 50% -12%, rgba(42,190,194,.12), transparent 42%), #0d1118; }

.rush-apex-topbar {
  display: grid;
  grid-template-columns: minmax(80px, 1fr) auto minmax(80px, 1fr);
  align-items: center;
  min-height: 46px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}

.rush-apex-topbar > img { display: block; width: min(138px, 38vw); max-height: 38px; object-fit: contain; }
.rush-apex-back, .rush-apex-close { display: inline-flex; align-items: center; justify-self: start; gap: 7px; min-height: 36px; padding: 0 10px; border: 1px solid rgba(255,255,255,.09); border-radius: 11px; background: #181e29; color: #e8edf6; font: inherit; font-size: 11px; font-weight: 740; cursor: pointer; }
.rush-apex-back > span:first-child { font-size: 17px; line-height: 1; }
.rush-apex-close { display: grid; width: 36px; justify-self: end; place-items: center; padding: 0; font-size: 21px; line-height: 1; }
.rush-apex-back:hover, .rush-apex-close:hover { border-color: rgba(115, 223, 224, .42); background: #1d2833; }
.rush-apex-back:focus-visible, .rush-apex-close:focus-visible, .rush-apex-dialog button:focus-visible, .rush-apex-dialog input:focus-visible { outline: 2px solid #65d9d6; outline-offset: 2px; }

.rush-apex-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 19px 0 16px; }
.rush-apex-kicker { display: block; color: #83dcd6; font-size: 9px; font-weight: 830; letter-spacing: .13em; }
.rush-apex-heading h2 { margin: 6px 0 5px; color: #f8faff; font-size: clamp(26px, 4vw, 34px); font-weight: 780; letter-spacing: -.045em; line-height: 1; }
.rush-apex-heading p { max-width: 580px; margin: 0; color: #a2acbb; font-size: 12px; line-height: 1.45; }
.rush-apex-balance { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 8px 12px; border: 1px solid rgba(120, 203, 203, .16); border-radius: 12px; background: linear-gradient(135deg, rgba(37, 110, 114, .22), #151b24 65%); text-align: left; white-space: nowrap; }
.rush-apex-wallet-icon { width: 17px; height: 17px; flex: 0 0 17px; color: #8eddb0; }
.rush-apex-balance span { color: #8d9ca9; font-size: 8px; font-weight: 820; letter-spacing: .11em; }
.rush-apex-balance strong { color: #eafcff; font-size: 18px; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }

.rush-apex-chart-card { overflow: hidden; border: 1px solid rgba(255,255,255,.075); border-radius: 18px; background: linear-gradient(145deg, #121a25, #0c1119); }
.rush-apex-market-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 67px; padding: 12px 15px 7px; }
.rush-apex-market-head > div { display: grid; gap: 3px; min-width: 0; }
.rush-apex-market-head > div > span { color: #9eacbc; font-size: 9px; font-weight: 830; letter-spacing: .1em; }
.rush-apex-market-head > div > strong { color: #f3f7fc; font-size: clamp(20px, 4vw, 27px); font-variant-numeric: tabular-nums; letter-spacing: -.035em; line-height: 1.05; }
.rush-apex-market-head > div > small { color: #91a2b0; font-size: 9px; font-variant-numeric: tabular-nums; }
.rush-apex-feed { display: inline-flex; align-items: center; gap: 7px; color: #8bded3; font-size: 8px; font-weight: 820; letter-spacing: .09em; text-align: right; }
.rush-apex-feed i { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: #63d2a3; box-shadow: 0 0 12px rgba(79, 226, 168, .43); animation: apex-live-pulse 1.5s ease-in-out infinite; }
.rush-apex-feed.is-offline { color: #f5b16f; }
.rush-apex-feed.is-offline i { background: #f5b16f; box-shadow: none; animation: none; }
.rush-apex-chart { position: relative; height: clamp(210px, 34vw, 292px); overflow: hidden; margin: 0 8px; }
.rush-apex-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.rush-apex-chart-message { display: grid; height: 100%; min-height: 210px; place-items: center; padding: 16px; color: #aab8c7; font-size: 12px; text-align: center; }
.apex-grid-line { stroke: rgba(159, 179, 208, .1); stroke-dasharray: 3 8; stroke-width: 1; }
.apex-area { fill: url(#apexLineGlow); }
.apex-price-line { fill: none; stroke: #70e3da; stroke-width: 3.4; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 7px rgba(70, 224, 211, .44)); }
.apex-current-line { stroke: rgba(113, 230, 220, .42); stroke-dasharray: 3 7; stroke-width: 1.2; }
.apex-current-dot { fill: #b9fff8; stroke: #102021; stroke-width: 3; filter: drop-shadow(0 0 7px rgba(87, 255, 230, .8)); }
.apex-shadow-line { stroke: #ffad66; stroke-width: 2; stroke-dasharray: 8 6; }
.apex-shadow-label { fill: #ffcf9e; font-size: 11px; font-weight: 800; paint-order: stroke; stroke: #11151d; stroke-width: 4px; stroke-linejoin: round; }
.rush-apex-chart-legend { display: flex; align-items: center; gap: 17px; min-height: 35px; padding: 0 15px 9px; color: #9aa6b5; font-size: 9px; font-weight: 690; }
.rush-apex-chart-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.rush-apex-chart-legend > span:last-child { margin-left: auto; color: #cbd6e2; font-variant-numeric: tabular-nums; }
.rush-apex-chart-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #70e3da; }
.rush-apex-chart-legend .apex-legend-shadow { border-radius: 2px; background: #ffad66; }
.rush-apex-chart-legend > span:last-child.is-up { color: #79e2ba; }
.rush-apex-chart-legend > span:last-child.is-down { color: #ff9e9b; }

.rush-apex-position { position: relative; display: grid; grid-template-columns: 132px minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 11px; padding: 11px 13px 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.075); border-radius: 15px; background: #131a24; }
.rush-apex-multiplier { display: grid; gap: 3px; }
.rush-apex-multiplier > span, .rush-apex-position-meta > b { color: #8795a6; font-size: 8px; font-weight: 820; letter-spacing: .1em; }
.rush-apex-multiplier > strong { color: #a8fff0; font-size: 26px; font-variant-numeric: tabular-nums; letter-spacing: -.04em; }
.rush-apex-position-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.rush-apex-position-meta > span { overflow: hidden; color: #929faf; font-size: 9px; font-weight: 780; letter-spacing: .065em; text-overflow: ellipsis; white-space: nowrap; }
.rush-apex-position-meta > span.is-active { color: #d4dce8; }
.rush-apex-position-meta > b { display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.rush-apex-position-meta > b strong { color: #ffd0a5; font-size: 11px; font-variant-numeric: tabular-nums; letter-spacing: 0; }
.rush-apex-progress { position: absolute; right: 13px; bottom: 8px; left: 13px; height: 3px; overflow: hidden; border-radius: 99px; background: #242f3a; }
.rush-apex-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #ee807a, #ffd078 55%, #67ddb6); transition: width 90ms linear; }
.rush-apex-progress i.is-danger { background: #ff696f; box-shadow: 0 0 9px rgba(255, 69, 82, .55); }

.rush-apex-play-panel { margin-top: 11px; padding: 13px; border: 1px solid rgba(120, 198, 205, .14); border-radius: 17px; background: radial-gradient(ellipse at 100% 0, rgba(50, 158, 158, .1), transparent 45%), #121821; }
.rush-apex-stake-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 11px; }
.rush-apex-stake-row label { display: flex; align-items: center; gap: 12px; color: #9aa8b8; font-size: 8px; font-weight: 830; letter-spacing: .1em; }
.rush-apex-stake-input { display: inline-flex; align-items: center; gap: 7px; height: 33px; padding: 0 9px; border: 1px solid rgba(255,255,255,.09); border-radius: 9px; background: #0d131c; color: #90a4b5; font-size: 10px; letter-spacing: 0; }
.rush-apex-stake-input input { width: 66px; border: 0; outline: 0; background: transparent; color: #eef6fc; font: inherit; font-size: 13px; font-weight: 770; font-variant-numeric: tabular-nums; }
.rush-apex-stake-input input::-webkit-inner-spin-button, .rush-apex-stake-input input::-webkit-outer-spin-button { margin: 0; appearance: none; }
.rush-apex-risk-note { color: #8190a0; font-size: 9px; text-align: right; }
.rush-apex-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
.rush-apex-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.rush-apex-sides button, .rush-apex-cashout { display: flex; align-items: center; justify-content: center; gap: 9px; min-height: 50px; border: 1px solid transparent; border-radius: 12px; color: #fff; font: inherit; font-size: 13px; font-weight: 850; letter-spacing: .045em; cursor: pointer; transition: transform 110ms ease, filter 110ms ease; }
.rush-apex-sides button:active, .rush-apex-cashout:active { transform: scale(.985); }
.rush-apex-sides button > span:first-child { font-size: 17px; }
.rush-apex-sides .is-long { border-color: rgba(67, 207, 157, .38); background: linear-gradient(135deg, #147f70, #176557); box-shadow: inset 0 1px rgba(255,255,255,.13), 0 6px 18px rgba(15, 121, 101, .18); }
.rush-apex-sides .is-short { border-color: rgba(255, 118, 126, .34); background: linear-gradient(135deg, #b34c5a, #7f3445); box-shadow: inset 0 1px rgba(255,255,255,.12), 0 6px 18px rgba(166, 59, 80, .16); }
.rush-apex-sides button:disabled { opacity: .48; cursor: wait; }
.rush-apex-cashout { width: 100%; justify-content: space-between; padding: 0 17px; border-color: rgba(103, 227, 183, .45); background: linear-gradient(105deg, #197d70, #20a884); box-shadow: inset 0 1px rgba(255,255,255,.2), 0 8px 24px rgba(19, 160, 125, .18); }
.rush-apex-cashout strong { color: #d5fff4; font-size: 15px; font-variant-numeric: tabular-nums; }
.rush-apex-tools { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 9px; }
.rush-apex-tools > button { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; min-height: 56px; padding: 8px 10px; border: 1px solid rgba(255,255,255,.08); border-radius: 11px; background: #171f2a; color: #e7edf3; text-align: left; cursor: pointer; }
.rush-apex-tools > button:disabled { opacity: .55; cursor: default; }
.rush-apex-tools > button.is-active { border-color: rgba(208, 149, 255, .48); background: rgba(124, 65, 177, .18); }
.rush-apex-tools > button > span { display: grid; grid-template-columns: 17px minmax(0, 1fr); gap: 2px 6px; min-width: 0; }
.rush-apex-tools > button i { grid-row: span 2; color: #c594ff; font-size: 15px; font-style: normal; }
.rush-apex-tools > button b { color: #e9eef4; font-size: 8px; font-weight: 840; letter-spacing: .08em; }
.rush-apex-tools > button small { overflow: hidden; color: #8f9cad; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.rush-apex-tools > button > strong { color: #9eacb9; font-size: 8px; font-weight: 850; letter-spacing: .08em; white-space: nowrap; }
.rush-apex-tools > button.is-active > strong { color: #dfaaff; }
.rush-apex-tools > button:disabled strong { color: #7e8997; }

.rush-apex-result { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 10px; padding: 12px; border: 1px solid rgba(116, 221, 187, .22); border-radius: 12px; background: rgba(39, 122, 102, .12); }
.rush-apex-result > div { display: grid; gap: 3px; }
.rush-apex-result > div > span { color: #8edec4; font-size: 8px; font-weight: 830; letter-spacing: .1em; }
.rush-apex-result > div > strong { color: #eefbf7; font-size: 13px; }
.rush-apex-result > div > p { margin: 0; color: #a9b7bf; font-size: 10px; line-height: 1.4; }
.rush-apex-result > button { min-height: 36px; padding: 0 12px; border: 1px solid rgba(255,255,255,.11); border-radius: 9px; background: #1c2932; color: #e7f5f2; font: inherit; font-size: 9px; font-weight: 800; white-space: nowrap; cursor: pointer; }
.rush-apex-disclaimer { margin: 10px 2px 0; color: #7f8b99; font-size: 9px; line-height: 1.45; }

.rush-apex-history { margin-top: 12px; padding: 12px 13px 11px; border: 1px solid rgba(255,255,255,.065); border-radius: 14px; background: #111720; }
.rush-apex-history > div:first-child { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.rush-apex-history > div:first-child > span { color: #91a1b2; font-size: 8px; font-weight: 830; letter-spacing: .12em; }
.rush-apex-history > div:first-child > b { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 7px; background: #202a37; color: #b6c3d1; font-size: 9px; }
.rush-apex-history-list { display: grid; gap: 5px; }
.rush-apex-history-list > span { padding: 5px 0 2px; color: #768597; font-size: 9px; }
.rush-apex-history-item { display: grid; grid-template-columns: minmax(110px, 1fr) 62px 88px; align-items: center; gap: 8px; min-height: 32px; padding: 5px 8px; border-radius: 8px; background: #151e29; }
.rush-apex-history-item > span { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.rush-apex-history-item > span b { color: #dce5ed; font-size: 8px; font-weight: 820; }
.rush-apex-history-item > span small { overflow: hidden; color: #8391a0; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.rush-apex-history-item > strong { color: #aeece0; font-size: 10px; font-variant-numeric: tabular-nums; }
.rush-apex-history-item > em { color: #7fe0b7; font-size: 9px; font-style: normal; font-variant-numeric: tabular-nums; text-align: right; }
.rush-apex-history-item.is-loss > em { color: #ff9ba0; }

@keyframes apex-dialog-in { from { opacity: 0; transform: translateY(7px) scale(.99); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes apex-live-pulse { 50% { box-shadow: 0 0 0 4px rgba(79, 226, 168, .08), 0 0 13px rgba(79, 226, 168, .4); } }

@media (max-width: 700px) {
  .rush-apex-dialog { inset: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border: 0; border-radius: 0; }
  .rush-apex-stage { max-height: 100dvh; padding: max(12px, env(safe-area-inset-top, 0px)) 13px calc(18px + env(safe-area-inset-bottom, 0px)); }
  html.telegram-miniapp .rush-apex-stage { padding-top: calc(var(--ff-telegram-header-clearance, 72px) + 22px); }
  .rush-apex-heading { align-items: flex-start; gap: 9px; padding: 14px 0 12px; }
  .rush-apex-heading p { max-width: 40ch; font-size: 11px; }
  .rush-apex-balance { min-width: 108px; padding: 8px; }
  .rush-apex-balance span { font-size: 7px; }
  .rush-apex-balance strong { font-size: 14px; }
  .rush-apex-chart { height: clamp(190px, 48vw, 252px); }
  .rush-apex-chart-legend { gap: 10px; padding-inline: 10px; font-size: 8px; }
  .rush-apex-position { grid-template-columns: 96px minmax(0, 1fr); gap: 8px; padding: 9px 10px 13px; }
  .rush-apex-multiplier > strong { font-size: 22px; }
  .rush-apex-position-meta { align-items: flex-start; flex-direction: column; gap: 4px; }
  .rush-apex-play-panel { padding: 10px; }
  .rush-apex-stake-row { align-items: flex-start; flex-direction: column; gap: 7px; }
  .rush-apex-risk-note { text-align: left; }
}

@media (max-width: 410px) {
  .rush-apex-back { min-height: 33px; padding-inline: 8px; }
  .rush-apex-topbar > img { width: 108px; }
  .rush-apex-heading { flex-direction: column; }
  .rush-apex-balance { width: 100%; box-sizing: border-box; grid-template-columns: auto 1fr; align-items: center; text-align: left; }
  .rush-apex-balance strong { justify-self: end; }
  .rush-apex-chart { height: 190px; }
  .rush-apex-chart-legend { gap: 8px; font-size: 7px; }
  .rush-apex-tools { grid-template-columns: 1fr; gap: 7px; }
  .rush-apex-tools > button { min-height: 49px; }
  .rush-apex-history-item { grid-template-columns: minmax(90px, 1fr) 50px 75px; }
  .rush-apex-history-item > span { flex-direction: column; gap: 1px; }
}

/* Apex Surfer visual direction: market terminal, compressed to one readable
   field with two unmistakable play controls. */
.rush-apex-surfer-art {
  background: linear-gradient(145deg, #111718, #090b0d 68%, #151017);
}
.rush-apex-surfer-art::before {
  inset: 18% 10% 16%;
  border-color: rgba(0, 255, 102, .24);
  background: linear-gradient(145deg, transparent 48%, rgba(0, 255, 102, .13) 48.5% 49%, transparent 49.5%);
}
.rush-apex-surfer-art::after { color: #00ff66; content: "↗"; text-shadow: 0 0 16px rgba(0, 255, 102, .25); }
.rush-apex-surfer-art .rush-game-art-label small { color: #00ff66; }

.rush-apex-dialog {
  border-color: rgba(215, 228, 221, .12);
  background: #0a0b0e;
  color: #f1f4f2;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  transition: box-shadow 160ms ease;
}
.rush-apex-dialog.is-danger { animation: apex-danger-pulse 650ms ease-in-out infinite alternate; }
.rush-apex-dialog.is-critical { animation-duration: 250ms; }
.rush-apex-stage {
  grid-template-columns: minmax(0, 1fr) 278px;
  grid-template-areas: "top top" "heading heading" "chart controls" "side controls" "position controls" "history history";
  gap: 10px 22px;
  padding: 17px 23px 19px;
}
.rush-apex-topbar { grid-template-columns: minmax(72px, 1fr) auto auto 36px; gap: 14px; }
.rush-apex-sound {
  min-height: 32px;
  padding: 0 9px;
  border: 1px solid rgba(255, 255, 255, .09);
  border-radius: 8px;
  background: transparent;
  color: #a9b0ad;
  font: 800 8px ui-monospace, SFMono-Regular, Menlo, monospace;
  letter-spacing: .08em;
  cursor: pointer;
}
.rush-apex-sound[aria-pressed="true"] { border-color: rgba(0, 255, 102, .35); color: #00ff66; }
.rush-apex-back, .rush-apex-close { border-color: rgba(255,255,255,.09); background: #111316; color: #cdd2ce; }
.rush-apex-back:hover, .rush-apex-close:hover { border-color: rgba(0,255,102,.34); background: #121713; }
.rush-apex-back:focus-visible, .rush-apex-close:focus-visible, .rush-apex-dialog button:focus-visible, .rush-apex-dialog input:focus-visible { outline-color: #00ff66; }
.rush-apex-kicker { color: #00ff66; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 8px; }
.rush-apex-heading h2 { color: #f3f5f3; letter-spacing: -.04em; }
.rush-apex-heading p { color: #838b86; }
.rush-apex-balance { border-color: rgba(255,255,255,.085); background: #101214; }
.rush-apex-wallet-icon { color: #00ff66; }
.rush-apex-balance span, .rush-apex-position-meta > span, .rush-apex-position-meta > b, .rush-apex-multiplier > span { color: #79817d; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.rush-apex-balance strong, .rush-apex-multiplier > strong, .rush-apex-market-head > div > strong,
.rush-apex-market-head > div > small, .rush-apex-position-meta > b strong, .rush-apex-history-item > strong,
.rush-apex-history-item > em, .rush-apex-cashout strong { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
.rush-apex-balance strong { color: #f1f4f2; }
.rush-apex-chart-card { border: 0; background: transparent; }
.rush-apex-market-head { border: 0; }
.rush-apex-market-head > div > span { color: #00ff66; font: 800 8px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; }
.rush-apex-market-head > div > strong { color: #f2f5f2; letter-spacing: -.045em; }
.rush-apex-market-head > div > small { color: #78817c; }
.rush-apex-feed { border-color: rgba(0,255,102,.16); background: rgba(0,255,102,.035); color: #8db99a; }
.rush-apex-feed i { background: #00ff66; box-shadow: 0 0 9px rgba(0,255,102,.5); }
.rush-apex-feed.is-offline { border-color: rgba(255,42,85,.2); background: rgba(255,42,85,.05); color: #d78a9b; }
.rush-apex-feed.is-offline i { background: #ff2a55; box-shadow: 0 0 9px rgba(255,42,85,.5); }
.rush-apex-chart {
  height: clamp(290px, 35vw, 385px);
  border-top: 1px solid rgba(255,255,255,.055);
  border-bottom: 1px solid rgba(255,255,255,.055);
  background: linear-gradient(180deg, rgba(0,255,102,.025), transparent 53%);
}
.apex-area stop:first-child { stop-color: #00ff66; stop-opacity: .14; }
.apex-price-line { stroke: #00ff66; stroke-width: 2.65; filter: drop-shadow(0 0 5px rgba(0,255,102,.25)); }
.apex-current-line { stroke: rgba(0,255,102,.28); }
.apex-current-dot { fill: #d8ffe4; stroke: #0b1710; filter: drop-shadow(0 0 6px rgba(0,255,102,.65)); }
.rush-apex-dialog.is-overdrive .apex-price-line { stroke: #f4fff8; filter: drop-shadow(0 0 8px rgba(255,255,255,.7)); }
.rush-apex-dialog.is-overdrive .apex-area stop:first-child { stop-color: #f4fff8; stop-opacity: .2; }
.rush-apex-chart-legend { color: #79817d; }
.rush-apex-chart-legend i { background: #00ff66; }
.rush-apex-chart-legend .apex-legend-shadow { background: #ff2a55; }
.rush-apex-chart-legend > span:last-child.is-up { color: #00ff66; }
.rush-apex-chart-legend > span:last-child.is-down { color: #ff6683; }
.rush-apex-position { grid-template-columns: 112px minmax(0, 1fr); border-color: rgba(255,255,255,.08); }
.rush-apex-multiplier > strong { color: #f1f4f2; }
.rush-apex-position-meta > b strong { color: #ff526f; }
.rush-apex-progress { background: #242427; }
.rush-apex-progress i { background: #00ff66; }
.rush-apex-progress i.is-danger { background: #ff2a55; box-shadow: 0 0 12px rgba(255,42,85,.65); }
.apex-shadow-line { stroke: #ff2a55; stroke-width: 2.7; stroke-linecap: square; filter: drop-shadow(0 0 5px rgba(255,42,85,.6)); animation: apex-shadow-breathe 360ms ease-in-out infinite alternate; }
.apex-shadow-label { fill: #ff7d94; stroke: #0a0b0e; font: 800 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.rush-apex-play-panel { grid-area: controls; align-self: start; margin: 0; padding: 11px 0 0 17px; border: 0; border-left: 1px solid rgba(255,255,255,.08); border-radius: 0; background: transparent; }
.rush-apex-stake-row { gap: 7px; padding-bottom: 12px; }
.rush-apex-stake-row label { color: #858c88; }
.rush-apex-stake-input { border-color: rgba(255,255,255,.1); background: #111315; color: #858c88; }
.rush-apex-stake-input input { color: #ecf0ed; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.rush-apex-risk-note, .rush-apex-disclaimer { color: #717a75; }
.rush-apex-tools { grid-template-columns: 1fr 1fr; gap: 7px; margin: 0 0 9px; }
.rush-apex-tools > button { min-height: 59px; border-color: rgba(255,255,255,.08); background: #121416; }
.rush-apex-tools > button#rushApexOverdrive { touch-action: none; }
.rush-apex-tools > button.is-active { border-color: rgba(244,255,248,.55); background: #1b211e; box-shadow: inset 0 0 20px rgba(0,255,102,.06); }
.rush-apex-tools > button i { color: #dce4df; }
.rush-apex-tools > button b { color: #dce2de; }
.rush-apex-tools > button small, .rush-apex-tools > button > strong { color: #818984; }
.rush-apex-tools > button.is-active > strong { color: #fff; }
.rush-apex-tools > button:disabled { opacity: .43; }
.rush-apex-sides { gap: 8px; }
.rush-apex-sides button {
  position: relative;
  min-height: 76px;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 10px;
  font-size: 12px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.rush-apex-sides button > span:first-child { display: none; }
.rush-apex-sides button b, .rush-apex-sides button small { position: relative; z-index: 1; }
.rush-apex-sides button b { font: 900 15px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .04em; }
.rush-apex-sides button small { font: 800 7px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .055em; opacity: .72; }
.rush-apex-hold-fill { position: absolute; z-index: 0; inset: auto 0 0; height: 100%; opacity: 0; transform: scaleY(.08); transform-origin: bottom; transition: transform 120ms ease, opacity 120ms ease; }
.rush-apex-sides .is-long { border-color: rgba(0,255,102,.36); background: #0d2719; box-shadow: inset 0 0 22px rgba(0,255,102,.055); color: #00ff66; }
.rush-apex-sides .is-long .rush-apex-hold-fill { background: linear-gradient(0deg, rgba(0,255,102,.28), rgba(0,255,102,0)); }
.rush-apex-sides .is-short { border-color: rgba(255,42,85,.38); background: #291016; box-shadow: inset 0 0 22px rgba(255,42,85,.06); color: #ff526f; }
.rush-apex-sides .is-short .rush-apex-hold-fill { background: linear-gradient(0deg, rgba(255,42,85,.3), rgba(255,42,85,0)); }
.rush-apex-sides button.is-position-active { border-width: 1.5px; }
.rush-apex-sides button.is-holding .rush-apex-hold-fill { opacity: 1; transform: scaleY(.72); }
.rush-apex-sides button:disabled { opacity: .25; cursor: not-allowed; }
.rush-apex-cashout { min-height: 43px; margin-top: 8px; border-color: rgba(255,255,255,.16); background: #171a18; color: #dce4de; box-shadow: none; font-size: 9px; }
.rush-apex-cashout strong { color: #00ff66; font-size: 11px; }
.rush-apex-result { border-color: rgba(0,255,102,.2); background: rgba(0,255,102,.035); }
.rush-apex-result > div > span { color: #00ff66; }
.rush-apex-result > div > strong { color: #e7eee9; }
.rush-apex-result > div > p { color: #a0a8a3; }
.rush-apex-result > button { background: #171a18; color: #e2e8e3; }
.rush-apex-history { border-color: rgba(255,255,255,.07); background: transparent; }
.rush-apex-history > div:first-child > span { color: #78817c; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.rush-apex-history > div:first-child > b { background: #171a18; color: #b3bcb6; }
.rush-apex-history-item { border-color: rgba(255,255,255,.055); background: #101214; }
.rush-apex-history-item > strong { color: #e2e8e3; }
.rush-apex-history-item > em { color: #00ff66; }
.rush-apex-history-item.is-loss > em { color: #ff526f; }
.rush-apex-dialog.is-shielded::after { position: absolute; z-index: 3; inset: 0; border: 1px solid rgba(124,255,168,.55); border-radius: inherit; content: ""; pointer-events: none; animation: apex-shield-burst 480ms ease-out both; }
.rush-apex-dialog.is-shielded { box-shadow: inset 0 0 85px rgba(0,255,102,.11), 0 32px 110px rgba(0,0,0,.68); }

@keyframes apex-shadow-breathe { from { opacity: .72; } to { opacity: 1; } }
@keyframes apex-danger-pulse { from { box-shadow: inset 0 0 22px rgba(255,42,85,.05), 0 32px 110px rgba(0,0,0,.68); } to { box-shadow: inset 0 0 64px rgba(255,42,85,.2), 0 32px 110px rgba(0,0,0,.68); } }
@keyframes apex-shield-burst { from { opacity: .8; transform: scale(.92); } to { opacity: 0; transform: scale(1.04); } }

@media (max-width: 700px) {
  .rush-apex-topbar { grid-template-columns: minmax(60px, 1fr) auto auto 34px; gap: 8px; }
  .rush-apex-stage { grid-template-areas: "top" "heading" "chart" "position" "controls" "history"; gap: 9px; }
  .rush-apex-chart { height: clamp(225px, 57vw, 315px); }
  .rush-apex-play-panel { grid-area: controls; padding: 10px 0 0; border: 0; border-top: 1px solid rgba(255,255,255,.075); }
  .rush-apex-actions { position: sticky; z-index: 5; bottom: env(safe-area-inset-bottom, 0px); margin: 0 -2px; padding: 9px 2px calc(8px + env(safe-area-inset-bottom, 0px)); background: #0a0b0e; }
  .rush-apex-stake-row { align-items: center; flex-direction: row; }
  .rush-apex-risk-note { text-align: right; }
  .rush-apex-tools { grid-template-columns: 1fr 1fr; }
  .rush-apex-sides button { min-height: 78px; }
  .rush-apex-disclaimer { margin-top: 7px; }
}
@media (max-width: 410px) {
  .rush-apex-topbar { grid-template-columns: minmax(50px, 1fr) auto auto 32px; gap: 5px; }
  .rush-apex-topbar > img { width: 92px; }
  .rush-apex-sound { min-height: 29px; padding: 0 5px; font-size: 7px; }
  .rush-apex-tools > button { min-height: 53px; flex-direction: row; align-items: center; }
  .rush-apex-tools > button > strong { align-self: center; margin: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .rush-apex-dialog.is-danger, .apex-shadow-line { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .rush-apex-dialog[open] { animation: none; }
  .rush-apex-feed i { animation: none; }
  .rush-apex-sides button, .rush-apex-cashout { transition: none; }
}

@media (max-width: 410px) {
  .rush-apex-heading { align-items: center; flex-direction: row; }
  .rush-apex-balance { width: auto; min-width: 0; flex: 0 0 auto; padding: 7px 9px; }
  .rush-apex-balance strong { justify-self: auto; }
}

/* Compact quote header, speaker control, and sportsbook-style stake entry. */
.rush-apex-sound {
  display: grid;
  width: 34px;
  min-height: 34px;
  padding: 0;
  place-items: center;
  border-radius: 10px;
  color: #aeb4b0;
}
.rush-apex-sound svg { width: 18px; height: 18px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rush-apex-sound-waves { display: none; }
.rush-apex-sound[aria-pressed="true"] .rush-apex-sound-waves { display: block; }
.rush-apex-sound[aria-pressed="true"] .rush-apex-sound-muted { display: none; }
.rush-apex-sound .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.rush-apex-market-head { min-width: 0; gap: 8px; }
.rush-apex-market-head > .rush-apex-market-quote { display: grid; min-width: 0; gap: 3px; }
.rush-apex-price-line { display: flex; min-width: 0; align-items: center; gap: 10px; }
.rush-apex-price-line > strong { color: #f2f5f2; font-size: clamp(21px, 5.2vw, 29px); font-variant-numeric: tabular-nums; letter-spacing: -.045em; line-height: 1; }
.rush-apex-instrument { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; padding-left: 9px; border-left: 1px solid rgba(255,255,255,.09); }
.rush-apex-btc-mark { display: grid; width: 21px; height: 21px; place-items: center; border-radius: 50%; background: #252927; color: #a4aaa6; font: 700 13px ui-sans-serif, system-ui, sans-serif; font-style: normal; }
.rush-apex-market-pair { display: grid; gap: 2px; }
.rush-apex-market-pair b { color: #a9afab; font: 750 8px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .025em; white-space: nowrap; }
.rush-apex-market-pair small { color: #747c77; font: 750 7px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; }
.rush-apex-market-quote > small { color: #78817c; font-size: 8px; font-variant-numeric: tabular-nums; }
.rush-apex-feed { flex: 0 0 auto; }
.rush-apex-stake-row { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 0 8px; }
.rush-apex-stake-left { grid-template-columns: minmax(0, 1fr); gap: 0; }
.rush-apex-stake-left > label { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.rush-apex-stake-controls { grid-template-columns: minmax(0, 1fr); gap: 5px; width: 100%; }
.rush-apex-stake-input { height: 40px; grid-template-columns: 34px minmax(40px,1fr) auto 34px; gap: 4px; border-color: rgba(255,255,255,.1); border-radius: 11px; background: #151719; box-shadow: none; }
.rush-apex-stake-input button { height: 32px; border-radius: 8px; background: #222623; }
.rush-apex-stake-shortcuts { gap: 6px; }
.rush-apex-stake-shortcuts button { height: 28px; border-color: rgba(255,255,255,.045); border-radius: 8px; background: #111311; font-size: 9px; }
.rush-apex-risk-note { display: none; }
@media (max-width: 410px) {
  .rush-apex-market-head { padding-inline: 7px; }
  .rush-apex-price-line { gap: 7px; }
  .rush-apex-price-line > strong { font-size: 20px; }
  .rush-apex-instrument { gap: 5px; padding-left: 7px; }
  .rush-apex-btc-mark { width: 19px; height: 19px; font-size: 12px; }
  .rush-apex-market-pair b { font-size: 7px; }
  .rush-apex-feed { max-width: 96px; gap: 5px; font-size: 6px; }
}

/* Solo crash flow: one live ride, one cash-out target, two tap abilities. */
.apex-btc-line { fill: none; stroke: rgba(161,177,166,.44); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 2 4; }
.rush-apex-chart-legend .apex-legend-ride { background: #00ff66; box-shadow: 0 0 8px rgba(0,255,102,.45); }
.rush-apex-chart-legend .apex-legend-price { background: #00ff66; box-shadow: 0 0 7px rgba(0,255,102,.35); }
.rush-apex-dialog button:focus-visible { outline: 2px solid #00ff66; outline-offset: 2px; }
.rush-apex-stage {
  grid-template-columns: minmax(0, 1fr);
  grid-template-areas: "top" "heading" "chart" "position" "controls" "history";
  gap: 8px;
  padding: 14px 22px 18px;
}
.rush-apex-heading { padding: 9px 0 8px; }
.rush-apex-heading p { color: #87908a; font-size: 11px; }
.rush-apex-kicker { font-size: 8px; }
.rush-apex-balance { min-width: 132px; }
.rush-apex-chart { height: clamp(245px, 39vh, 360px); }
.rush-apex-market-head { min-height: 58px; padding-top: 6px; }
.rush-apex-position { margin-top: 0; }
.rush-apex-play-panel {
  grid-area: controls;
  align-self: end;
  margin: 0;
  padding: 9px 0 0;
  border: 0;
  border-top: 1px solid rgba(255,255,255,.075);
  border-radius: 0;
  background: transparent;
}
.rush-apex-stake-row { align-items: center; padding: 0 2px 8px; }
.rush-apex-stake-row label { display: flex; align-items: center; gap: 10px; color: #929a95; font-size: 9px; }
.rush-apex-risk-note { font-size: 8px; text-align: right; }
.rush-apex-actions {
  position: sticky;
  z-index: 5;
  bottom: 0;
  display: grid;
  grid-template-columns: minmax(82px, .85fr) minmax(140px, 1.55fr) minmax(82px, .85fr);
  align-items: stretch;
  gap: 9px;
  margin: 0 -2px;
  padding: 7px 2px 8px;
  background: linear-gradient(180deg, rgba(10,11,14,.94), #0a0b0e 24%);
}
.rush-apex-boost, .rush-apex-main-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 13px;
  cursor: pointer;
  transition: transform 100ms ease, border-color 120ms ease, filter 120ms ease;
  -webkit-tap-highlight-color: transparent;
}
.rush-apex-boost {
  min-height: 64px;
  padding: 5px 7px;
  background: #121517;
  color: #e7ece8;
}
.rush-apex-boost > i { color: #c7d4cb; font: 800 19px ui-monospace, SFMono-Regular, Menlo, monospace; }
.rush-apex-boost > span { display: grid; gap: 4px; text-align: left; }
.rush-apex-boost b { font: 900 8px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .045em; }
.rush-apex-boost small { color: #7f8b83; font: 800 7px ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.rush-apex-boost#rushApexOverdrive { border-color: rgba(204,238,218,.16); }
.rush-apex-boost#rushApexOverdrive.is-active { border-color: rgba(255,255,255,.54); color: #fff; box-shadow: inset 0 0 20px rgba(255,255,255,.06); }
.rush-apex-shield-button { border-color: rgba(0,255,102,.23); background: #101a14; }
.rush-apex-shield-button > i { color: #00ff66; }
.rush-apex-main-action {
  min-height: 76px;
  flex-direction: column;
  gap: 4px;
  border: 1px solid rgba(0,255,102,.45);
  background: linear-gradient(180deg, #15331f, #0c2114);
  color: #00ff66;
  box-shadow: 0 0 24px rgba(0,255,102,.09), inset 0 1px rgba(255,255,255,.08);
}
.rush-apex-main-action > span { font: 950 16px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .045em; }
.rush-apex-main-action > strong { color: #c5e6d0; font: 800 10px ui-monospace, SFMono-Regular, Menlo, monospace; }
.rush-apex-main-action.is-cashing { border-color: rgba(0,255,102,.7); background: linear-gradient(180deg, #1d512d, #10351c); box-shadow: 0 0 30px rgba(0,255,102,.16), inset 0 1px rgba(255,255,255,.13); }
.rush-apex-main-action.is-cashing > span { font-size: 19px; }
.rush-apex-boost:active, .rush-apex-main-action:active { transform: scale(.975); }
.rush-apex-boost:disabled, .rush-apex-main-action:disabled { filter: grayscale(.65); opacity: .36; cursor: not-allowed; }
.rush-apex-result { margin-top: 2px; }
.rush-apex-disclaimer { display: none; }
.rush-apex-history { margin-top: 0; opacity: .76; }
.rush-apex-history > div:first-child > span { font-size: 7px; }

@media (max-width: 700px) {
  .rush-apex-stage { max-height: 100dvh; grid-template-columns: minmax(0,1fr); grid-template-areas: "top" "heading" "chart" "position" "controls" "history"; gap: 7px; padding: max(10px, env(safe-area-inset-top, 0px)) 13px calc(8px + env(safe-area-inset-bottom, 0px)); }
  html.telegram-miniapp .rush-apex-stage { padding-top: calc(var(--ff-telegram-header-clearance, 72px) + 15px); }
  .rush-apex-heading { align-items: center; flex-direction: row; gap: 8px; padding: 6px 0; }
  .rush-apex-heading h2 { margin: 4px 0 2px; font-size: 24px; }
  .rush-apex-heading p { display: none; }
  .rush-apex-balance { min-width: 0; padding: 7px 9px; }
  .rush-apex-wallet-icon { width: 15px; height: 15px; flex-basis: 15px; }
  .rush-apex-balance span { font-size: 6px; }
  .rush-apex-balance strong { font-size: 14px; }
  .rush-apex-chart { height: clamp(210px, 34vh, 300px); }
  .rush-apex-market-head { min-height: 50px; padding-inline: 8px; }
  .rush-apex-market-head > div > strong { font-size: 20px; }
  .rush-apex-market-head > div > small { font-size: 8px; }
  .rush-apex-feed { max-width: 108px; font-size: 7px; }
  .rush-apex-chart-legend { min-height: 26px; padding: 0 9px 5px; font-size: 7px; }
  .rush-apex-position { grid-template-columns: 105px minmax(0,1fr); gap: 6px; padding: 7px 9px 10px; }
  .rush-apex-multiplier > strong { font-size: 25px; }
  .rush-apex-position-meta { align-items: flex-start; flex-direction: column; gap: 5px; }
  .rush-apex-position-meta > span { font-size: 8px; }
  .rush-apex-play-panel { grid-area: controls; padding-top: 6px; }
  .rush-apex-stake-row { gap: 4px; padding-bottom: 5px; }
  .rush-apex-stake-row label { gap: 7px; font-size: 8px; }
  .rush-apex-risk-note { font-size: 7px; }
  .rush-apex-actions { bottom: 0; gap: 6px; padding: 5px 2px calc(5px + env(safe-area-inset-bottom, 0px)); }
  .rush-apex-boost { min-height: 62px; flex-direction: column; gap: 1px; padding: 4px 2px; }
  .rush-apex-boost > i { font-size: 16px; line-height: 1; }
  .rush-apex-boost > span { gap: 3px; text-align: center; }
  .rush-apex-boost b { font-size: 7px; }
  .rush-apex-boost small { font-size: 6px; }
  .rush-apex-main-action { min-height: 69px; }
  .rush-apex-main-action > span { font-size: 15px; }
  .rush-apex-main-action.is-cashing > span { font-size: 17px; }
  .rush-apex-history { display: none; }
}
@media (max-width: 390px) {
  .rush-apex-stage { padding-inline: 9px; }
  .rush-apex-topbar { grid-template-columns: minmax(48px,1fr) auto auto 31px; gap: 5px; }
  .rush-apex-topbar > img { width: 88px; }
  .rush-apex-sound { min-height: 28px; padding-inline: 4px; font-size: 7px; }
  .rush-apex-actions { grid-template-columns: minmax(68px,.78fr) minmax(126px,1.5fr) minmax(68px,.78fr); gap: 5px; }
  .rush-apex-boost b { font-size: 6px; }
  .rush-apex-main-action > span { font-size: 14px; }
}

/* Clear direction choice and a steady, zoomed-out market canvas. */
.rush-apex-chart { height: clamp(270px, 42vh, 390px); }
.rush-apex-chart-canvas { display: block; width: 100%; height: 100%; }
.rush-apex-dialog.is-overdrive .rush-apex-chart-canvas { filter: brightness(1.13) saturate(1.16); }
.rush-apex-chart-legend .apex-legend-price.is-down { background: #ff526f; }
.rush-apex-round-history {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 39px;
  padding: 4px 11px;
  border-bottom: 1px solid rgba(255,255,255,.055);
}
.rush-apex-round-history > div:first-child { display: flex; align-items: center; gap: 7px; }
.rush-apex-round-history > div:first-child > span { color: #828b84; font: 800 8px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .08em; }
.rush-apex-round-history > div:first-child > b { color: #657169; font: 700 8px ui-monospace, SFMono-Regular, Menlo, monospace; }
.rush-apex-round-list { display: flex; min-width: 0; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.rush-apex-round-list::-webkit-scrollbar { display: none; }
.rush-apex-round-list > span:not(.rush-apex-round-chip) { color: #68716b; font: 9px ui-monospace, SFMono-Regular, Menlo, monospace; white-space: nowrap; }
.rush-apex-round-chip { flex: 0 0 auto; padding: 4px 8px; border: 1px solid rgba(255,255,255,.08); border-radius: 5px; background: rgba(255,255,255,.035); color: #c4cdc7; font: 800 9px ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }
.rush-apex-round-chip.is-win { border-color: rgba(0,255,102,.19); background: rgba(0,255,102,.075); color: #72e69d; }
.rush-apex-round-chip.is-loss { border-color: rgba(255,42,85,.17); background: rgba(255,42,85,.065); color: #ff788e; }
.rush-apex-position { grid-template-rows: auto; padding-bottom: 11px; }
.rush-apex-position-meta > span.is-short { color: #ff7b90; }
.rush-apex-side-picker { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); gap: 6px; padding: 1px 2px 8px; }
.rush-apex-side-picker > span { grid-column: 1 / -1; margin-bottom: 1px; color: #808983; font: 800 8px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; }
.rush-apex-side-picker button { display: flex; min-height: 40px; align-items: center; justify-content: center; gap: 8px; border: 1px solid rgba(255,255,255,.09); border-radius: 9px; background: #111412; color: #cbd2cd; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.rush-apex-side-picker button > i { font: 800 15px ui-monospace, SFMono-Regular, Menlo, monospace; }
.rush-apex-side-picker button > span { display: flex; align-items: baseline; gap: 6px; }
.rush-apex-side-picker button b { font: 900 9px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .06em; }
.rush-apex-side-picker button small { color: #737d76; font: 700 7px ui-monospace, SFMono-Regular, Menlo, monospace; }
.rush-apex-side-picker button.is-long.is-selected { border-color: rgba(0,255,102,.45); background: rgba(0,255,102,.09); color: #00ff66; box-shadow: inset 0 0 15px rgba(0,255,102,.04); }
.rush-apex-side-picker button.is-short.is-selected { border-color: rgba(255,42,85,.48); background: rgba(255,42,85,.09); color: #ff526f; box-shadow: inset 0 0 15px rgba(255,42,85,.04); }
.rush-apex-side-picker button:disabled { cursor: default; opacity: .7; }
.rush-apex-side-picker > small { grid-column: 1 / -1; color: #778079; font-size: 8px; }
.rush-apex-risk-note { color: #929a94; }
.rush-apex-shield-button small { color: #ffa9b6; }
.rush-apex-boost#rushApexOverdrive small { color: #f1ad77; }

@media (max-width: 700px) {
  .rush-apex-chart { height: clamp(250px, 36vh, 330px); }
  .rush-apex-round-history { min-height: 35px; gap: 8px; padding-inline: 8px; }
  .rush-apex-round-history > div:first-child > span { font-size: 7px; }
  .rush-apex-round-chip { padding: 4px 6px; font-size: 8px; }
  .rush-apex-side-picker { padding-bottom: 6px; }
  .rush-apex-side-picker button { min-height: 36px; }
  .rush-apex-side-picker button > span { flex-direction: column; align-items: flex-start; gap: 2px; }
  .rush-apex-side-picker > small { font-size: 7px; }
  .rush-apex-boost small { max-width: 92px; font-size: 7px; line-height: 1.15; text-align: center; white-space: normal; }
}

@media (max-width: 390px) {
  .rush-apex-chart { height: clamp(235px, 32vh, 290px); }
  .rush-apex-side-picker button small { font-size: 7px; }
  .rush-apex-round-history { grid-template-columns: auto minmax(0,1fr); }
}

/* Clear live time scale, pursuit labels, and sportsbook-style stake controls. */
.rush-apex-chart-legend { flex-wrap: wrap; row-gap: 5px; }
.rush-apex-chart-legend > span { white-space: nowrap; }
.rush-apex-stake-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0 2px 9px;
}
.rush-apex-stake-left {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.rush-apex-stake-left > label { color: #8b948e; font: 800 8px ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; }
.rush-apex-stake-controls { display: grid; grid-template-columns: minmax(110px, 1fr); gap: 5px; min-width: 0; }
.rush-apex-stake-input {
  display: grid;
  grid-template-columns: 30px minmax(40px, 1fr) auto 30px;
  align-items: center;
  gap: 2px;
  width: 100%;
  height: 38px;
  padding: 3px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 10px;
  background: #141719;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
.rush-apex-stake-input input {
  width: 100%;
  min-width: 0;
  padding: 0;
  color: #f1f4f2;
  font-size: 14px;
  text-align: center;
}
.rush-apex-stake-input b { color: #828b85; font: 700 9px ui-monospace, SFMono-Regular, Menlo, monospace; }
.rush-apex-stake-input button,
.rush-apex-stake-shortcuts button {
  display: grid;
  min-width: 0;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: #252a27;
  color: #dce3de;
  font: 800 12px ui-monospace, SFMono-Regular, Menlo, monospace;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.rush-apex-stake-input button { height: 29px; }
.rush-apex-stake-shortcuts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.rush-apex-stake-shortcuts button { height: 25px; border: 1px solid rgba(255,255,255,.06); background: #121513; color: #929c95; font-size: 8px; }
.rush-apex-stake-input button:active, .rush-apex-stake-shortcuts button:active { background: #303833; }
.rush-apex-stake-input button:disabled, .rush-apex-stake-shortcuts button:disabled { opacity: .38; cursor: default; }
.rush-apex-risk-note { max-width: 128px; color: #777f79; font-size: 8px; line-height: 1.35; text-align: right; }
.rush-apex-position-meta > b strong.is-danger { color: #ff2a55; text-shadow: 0 0 10px rgba(255,42,85,.55); animation: apex-shadow-urgent .36s ease-in-out infinite alternate; }
@keyframes apex-shadow-urgent { from { opacity: .68; } to { opacity: 1; } }

@media (max-width: 390px) {
  .rush-apex-stake-row { grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
  .rush-apex-stake-left { grid-template-columns: 37px minmax(0, 1fr); gap: 6px; }
  .rush-apex-stake-controls { grid-template-columns: minmax(104px, 1fr); }
  .rush-apex-risk-note { max-width: 90px; font-size: 7px; }
}

/* Price stop and launch pacing, styled to match the compact 1win betting panel. */
.rush-apex-chart-legend .apex-legend-stop { border-radius: 2px; background: #f2b84b; box-shadow: 0 0 7px rgba(242,184,75,.25); }
.rush-apex-round-chip.is-stop { border-color: rgba(242,184,75,.28); background: rgba(242,184,75,.08); color: #f2c76f; }
.rush-apex-main-action.is-arming {
  border-color: rgba(242,184,75,.54);
  background: linear-gradient(90deg, rgba(242,184,75,.2) 0 var(--apex-launch-progress, 0%), #132219 var(--apex-launch-progress, 0%) 100%);
  color: #f1cc7a;
  box-shadow: inset 0 1px rgba(255,255,255,.07);
}
.rush-apex-main-action.is-arming:disabled { filter: none; opacity: .84; }
.rush-apex-main-action.is-arming > strong { color: #f5e5bf; }
.rush-apex-side-picker { grid-area: side; }
.rush-apex-history-list { display: flex; min-width: 0; gap: 6px; overflow-x: auto; scrollbar-width: none; }
.rush-apex-history-list::-webkit-scrollbar { display: none; }
.rush-apex-progress { display: none; }
@media (max-width: 700px) {
  .rush-apex-stage { grid-template-areas: "top" "heading" "chart" "side" "position" "controls" "history"; }
  .rush-apex-history { display: block; }
}

/* Native-feeling touch details for iPhone/iPad without changing the compact Rush layout. */
@supports (-webkit-touch-callout: none) {
  .rush-apex-dialog { color-scheme: dark; }
  .rush-apex-stage { -webkit-overflow-scrolling: touch; }
  .rush-apex-actions {
    border-top: 1px solid rgba(255,255,255,.07);
    background: linear-gradient(180deg, rgba(10,11,14,.64), rgba(10,11,14,.92) 28%, rgba(10,11,14,.96));
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    backdrop-filter: blur(16px) saturate(1.15);
  }
  .rush-apex-back, .rush-apex-close { min-height: 40px; border-radius: 13px; }
  .rush-apex-side-picker button { min-height: 44px; border-radius: 12px; }
  .rush-apex-stake-input { height: 40px; border-radius: 12px; }
  .rush-apex-stake-input input { font-size: 16px; }
  .rush-apex-stake-input button { height: 32px; border-radius: 9px; }
  .rush-apex-stake-shortcuts button { min-height: 29px; border-radius: 9px; }
  .rush-apex-boost { border-radius: 14px; }
  .rush-apex-main-action { border-radius: 16px; }
  .rush-apex-side-picker button:active,
  .rush-apex-stake-input button:active,
  .rush-apex-stake-shortcuts button:active,
  .rush-apex-boost:active,
  .rush-apex-main-action:active { transform: scale(.97); }
}

@media (max-width: 410px) {
  .rush-apex-heading { align-items: center; flex-direction: row; }
  .rush-apex-balance { width: auto; min-width: 0; flex: 0 0 auto; padding: 7px 9px; }
  .rush-apex-balance strong { justify-self: auto; }
}

/* Keep the stake field full-width; leave its hint to the result copy. */
.rush-apex-stake-row { grid-template-columns: minmax(0, 1fr); }
.rush-apex-stake-left { grid-template-columns: minmax(0, 1fr); gap: 0; }
.rush-apex-stake-controls { grid-template-columns: minmax(0, 1fr); }
.rush-apex-risk-note { display: none; }

/* Larger tap controls with one clear action and one short cost/risk line. */
.rush-apex-stake-input { height: 48px; grid-template-columns: 38px minmax(44px,1fr) auto 38px; border-radius: 12px; }
.rush-apex-stake-input button { height: 38px; border-radius: 9px; font-size: 19px; }
.rush-apex-stake-input input { font-size: 18px; }
.rush-apex-stake-input b { font-size: 11px; }
.rush-apex-stake-shortcuts { gap: 7px; }
.rush-apex-stake-shortcuts button { height: 38px; min-height: 38px; border-color: rgba(255,255,255,.09); border-radius: 10px; background: #171a18; color: #d7ded9; font: 800 11px ui-sans-serif, system-ui, sans-serif; letter-spacing: .025em; }
.rush-apex-boost { min-height: 82px; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 7px 5px; border-radius: 15px; }
.rush-apex-boost > i { display: grid; width: 22px; height: 22px; place-items: center; color: #efb45b; }
.rush-apex-boost > i svg { display: block; width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.rush-apex-boost > span { display: grid; min-width: 0; gap: 3px; text-align: center; }
.rush-apex-boost b { color: #f1f4f2; font: 850 11px ui-sans-serif, system-ui, sans-serif; letter-spacing: .015em; white-space: nowrap; }
.rush-apex-boost small { max-width: none; color: #c2cbc5; font: 750 9px ui-sans-serif, system-ui, sans-serif; line-height: 1.2; text-align: center; white-space: normal; }
.rush-apex-boost#rushApexOverdrive { border-color: rgba(242,184,75,.28); background: #17140f; }
.rush-apex-boost#rushApexOverdrive.is-active { border-color: rgba(255,255,255,.65); background: #292319; }
.rush-apex-boost#rushApexOverdrive small { color: #f2bf70; }
.rush-apex-shield-button { border-color: rgba(255,82,111,.27); background: #191116; }
.rush-apex-shield-button > i { color: #ff7c90; }
.rush-apex-shield-button small { color: #ff9aab; }
.rush-apex-boost:disabled { opacity: .8; filter: grayscale(.35); }
.rush-apex-main-action { min-height: 86px; border-radius: 16px; }
.rush-apex-main-action > span { font-size: 20px; }
.rush-apex-main-action > strong { font-size: 12px; }
.rush-apex-main-action.is-cashing > span { font-size: 21px; }

@media (max-width: 390px) {
  .rush-apex-actions { grid-template-columns: minmax(94px,1fr) minmax(128px,1.35fr) minmax(94px,1fr); gap: 7px; }
  .rush-apex-boost { min-height: 82px; }
  .rush-apex-boost b { font-size: 10.5px; }
  .rush-apex-boost small { font-size: 8.5px; }
  .rush-apex-main-action > span { font-size: 18px; }
}
@media (max-width: 360px) {
  .rush-apex-actions { grid-template-columns: minmax(0,1fr) minmax(0,1fr); grid-template-areas: "main main" "boost shield"; gap: 7px; }
  #rushApexMainAction { grid-area: main; min-height: 72px; }
  #rushApexOverdrive { grid-area: boost; }
  #rushApexShield { grid-area: shield; }
}

/* Compact betting dock: the cash-out button leads, utilities stay legible. */
.rush-apex-stake-row { grid-template-columns: minmax(0, 1fr); gap: 0; padding: 0 2px 8px; }
.rush-apex-stake-left, .rush-apex-stake-controls { grid-template-columns: minmax(0, 1fr); gap: 0; }
.rush-apex-risk-note { display: none; }
.rush-apex-stake-input {
  height: 46px;
  grid-template-columns: 36px minmax(46px, 1fr) auto 36px;
  gap: 3px;
  padding: 3px;
  border-color: rgba(255,255,255,.12);
  border-radius: 11px;
  background: #121513;
  box-shadow: none;
}
.rush-apex-stake-input button {
  height: 36px;
  border-radius: 8px;
  background: #202521;
  color: #d8dfda;
  font-size: 18px;
}
.rush-apex-stake-input input { color: #f5f7f5; font-size: 17px; }
.rush-apex-stake-input b { color: #89928b; font-size: 10px; }
.rush-apex-stake-shortcuts { gap: 6px; margin-top: 6px; }
.rush-apex-stake-shortcuts button {
  height: 32px;
  min-height: 32px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 8px;
  background: #121513;
  color: #b7c1b9;
  font: 800 10px ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .02em;
}
.rush-apex-actions {
  position: sticky;
  z-index: 5;
  bottom: 0;
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) 60px;
  grid-template-areas: none;
  align-items: stretch;
  gap: 8px;
  margin: 0 -2px;
  padding: 10px 2px 7px;
  border-top: 1px solid rgba(255,255,255,.07);
  background: #0a0b0e;
}
.rush-apex-boost,
.rush-apex-main-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 58px;
  margin: 0;
  border-radius: 12px;
  box-shadow: none;
  transition: transform 100ms ease, border-color 120ms ease, background-color 120ms ease, color 120ms ease;
}
.rush-apex-boost {
  flex-direction: column;
  gap: 4px;
  padding: 5px 2px;
  border: 1px solid rgba(255,255,255,.14);
  background: #111412;
  color: #d9e0dc;
}
.rush-apex-boost > i {
  display: grid;
  width: 21px;
  height: 21px;
  place-items: center;
  color: #e6b457;
}
.rush-apex-boost > i svg {
  display: block;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.rush-apex-boost > span { display: block; min-width: 0; text-align: center; }
.rush-apex-boost b {
  display: block;
  color: inherit;
  font: 850 8px ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .035em;
  line-height: 1;
  white-space: nowrap;
}
.rush-apex-boost small { display: none; }
.rush-apex-boost#rushApexOverdrive { border-color: rgba(242,184,75,.32); background: #16140f; }
.rush-apex-boost#rushApexOverdrive.is-active { border-color: #f2b84b; background: #2b2415; color: #fff2ce; }
.rush-apex-shield-button { border-color: rgba(255,103,126,.3); background: #171114; }
.rush-apex-shield-button > i { color: #ff788d; }
.rush-apex-boost:disabled { opacity: .42; filter: none; }
.rush-apex-main-action {
  flex-direction: column;
  gap: 2px;
  padding: 7px 9px;
  border: 1px solid #00c863;
  background: #10351d;
  color: #00f174;
}
.rush-apex-main-action > span { font: 900 16px ui-sans-serif, system-ui, sans-serif; letter-spacing: .025em; line-height: 1.05; }
.rush-apex-main-action > strong { color: #c6e8d1; font: 750 10px ui-sans-serif, system-ui, sans-serif; letter-spacing: .01em; }
.rush-apex-main-action.is-cashing { border-color: #00e477; background: #0d4723; color: #00f17a; }
.rush-apex-main-action.is-cashing > span { font-size: 17px; }
.rush-apex-main-action.is-arming { border-color: rgba(242,184,75,.7); background: #242015; color: #f2cb71; box-shadow: none; }
.rush-apex-main-action.is-arming > strong { color: #f8e4ae; }
.rush-apex-main-action:disabled { filter: none; opacity: .72; }
.rush-apex-boost:active,
.rush-apex-main-action:active { transform: scale(.975); }

/* The stage scrolls vertically.  Keep the primary CTA a tap target instead of
   letting a tiny finger movement be interpreted as a stage pan in WebViews. */
#rushApexMainAction,
#rushApexAgain,
.rush-apex-stake-input button,
.rush-apex-stake-shortcuts button {
  touch-action: manipulation;
}
.rush-apex-action-hint {
  grid-column: 1 / -1;
  margin: 0;
  color: #89928b;
  font: 750 8px ui-sans-serif, system-ui, sans-serif;
  letter-spacing: .015em;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

@supports (-webkit-touch-callout: none) {
  .rush-apex-actions {
    padding-bottom: calc(7px + env(safe-area-inset-bottom, 0px));
    background: rgba(10,11,14,.96);
    -webkit-backdrop-filter: blur(16px) saturate(1.1);
    backdrop-filter: blur(16px) saturate(1.1);
  }
  .rush-apex-stake-input { height: 46px; border-radius: 11px; }
  .rush-apex-stake-input button { height: 36px; border-radius: 8px; }
  .rush-apex-stake-shortcuts button { min-height: 32px; border-radius: 8px; }
  .rush-apex-boost, .rush-apex-main-action { border-radius: 12px; }
}

@media (max-width: 390px) {
  .rush-apex-actions { grid-template-columns: 56px minmax(0, 1fr) 56px; gap: 7px; }
  .rush-apex-main-action > span { font-size: 15px; }
  .rush-apex-action-hint { font-size: 7.5px; }
}
@media (max-width: 360px) {
  .rush-apex-actions { grid-template-columns: 53px minmax(0, 1fr) 53px; gap: 6px; }
  #rushApexMainAction { grid-area: auto; min-height: 56px; }
  #rushApexOverdrive, #rushApexShield { grid-area: auto; }
  .rush-apex-boost b { font-size: 7px; }
  .rush-apex-action-hint { font-size: 7px; letter-spacing: 0; }
}
