.mobile-drawings-action { display: none !important; }

html.ios-scroll-performance-mode,
html.ios-scroll-performance-mode body {
  overscroll-behavior-y: none;
}

@media (max-width: 820px) {
  body.market-launch-ready {
    overscroll-behavior: none;
  }

  body.market-launch-ready .mobile-drawings-action {
    display: grid !important;
    place-items: center;
  }

  body.market-launch-ready .market-top-actions {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    gap: 4px !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .market-topbar {
    display: grid !important;
    position: fixed !important;
    inset: 0 0 auto 0 !important;
    z-index: 940 !important;
    height: calc(56px + env(safe-area-inset-top)) !important;
    min-height: calc(56px + env(safe-area-inset-top)) !important;
    padding: env(safe-area-inset-top) 8px 0 !important;
    grid-template-columns: 38px minmax(0, 1fr) auto !important;
    gap: 7px !important;
    border-bottom: 1px solid rgba(255,255,255,.085) !important;
    background: rgba(6, 8, 11, .985) !important;
    box-shadow: 0 8px 28px rgba(0,0,0,.28) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .market-back,
  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .top-action {
    width: 36px !important;
    height: 36px !important;
    min-width: 36px !important;
    min-height: 36px !important;
    border-radius: 10px !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .market-brand {
    gap: 7px !important;
    min-width: 0 !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .market-brand__mark {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    border-radius: 10px !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .market-brand__mark img {
    width: 31px !important;
    height: 31px !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .market-brand strong {
    font-size: 12px !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .market-brand small,
  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .market-account-silent {
    display: none !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .market-main {
    display: flex !important;
    flex-direction: column !important;
    position: fixed !important;
    inset:
      calc(56px + env(safe-area-inset-top))
      0
      calc(64px + env(safe-area-inset-bottom))
      0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
    background: #070a0e !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .market-workspace-header {
    display: block !important;
    flex: 0 0 auto !important;
    min-height: 0 !important;
    background: #090d12 !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .instrument-strip {
    min-height: 48px !important;
    margin: 0 !important;
    padding: 6px 9px !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    background: #090d12 !important;
    box-shadow: none !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .instrument-icon {
    width: 32px !important;
    height: 32px !important;
    border-radius: 9px !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .instrument-title h1 {
    font-size: 13px !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .instrument-title p {
    margin-top: 2px !important;
    font-size: 7px !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .quote-block strong {
    font-size: 15px !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .quote-block span {
    display: none !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .market-selector {
    min-height: 34px !important;
    margin: 0 !important;
    padding: 0 7px 4px !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-top: 0 !important;
    border-radius: 0 !important;
    background: #080c11 !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .market-selector::before,
  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .market-selector::after {
    display: none !important;
    content: none !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .asset-rail {
    display: none !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .timeframe-rail {
    display: flex !important;
    gap: 4px !important;
    width: 100% !important;
    overflow-x: auto !important;
    scrollbar-width: none !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .timeframe-rail::-webkit-scrollbar {
    display: none !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .timeframe-rail button {
    flex: 1 0 42px !important;
    min-width: 42px !important;
    height: 29px !important;
    min-height: 29px !important;
    padding: 0 8px !important;
    border-radius: 8px !important;
    font-size: 8px !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .chart-card {
    display: flex !important;
    flex: 1 1 auto !important;
    flex-direction: column !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow: hidden !important;
    border-left: 0 !important;
    border-right: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: #070a0e !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .workspace-commandbar {
    flex: 0 0 39px !important;
    min-height: 39px !important;
    padding: 3px 7px !important;
    background: #080c11 !important;
    border-bottom: 1px solid rgba(255,255,255,.075) !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .workspace-commandbar .command-button {
    width: 34px !important;
    height: 32px !important;
    min-height: 32px !important;
    border-radius: 8px !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready #drawingsBtn {
    display: none !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready #objectsBtn span {
    display: none !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .chart-workspace {
    display: block !important;
    flex: 1 1 auto !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 0 !important;
    overflow: hidden !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .drawing-toolbar.quick-toolbar {
    display: none !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .chart-stage {
    display: block !important;
    position: relative !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    overflow: hidden !important;
    background: #070a0e !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .chart-statusbar {
    display: none !important;
  }

  body.market-launch-ready .market-bottom-nav {
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    z-index: 945 !important;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    width: 100% !important;
    max-width: none !important;
    height: calc(64px + env(safe-area-inset-bottom)) !important;
    min-height: calc(64px + env(safe-area-inset-bottom)) !important;
    padding: 4px 8px env(safe-area-inset-bottom) !important;
    transform: none !important;
    border: 0 !important;
    border-top: 1px solid rgba(255,255,255,.085) !important;
    border-radius: 0 !important;
    background: rgba(7, 10, 14, .985) !important;
    box-shadow: 0 -12px 28px rgba(0,0,0,.24) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
  }

  body.market-launch-ready .market-bottom-nav button {
    min-width: 0 !important;
    min-height: 54px !important;
    padding: 3px 6px !important;
    border-radius: 10px !important;
    color: #7f8997 !important;
  }

  body.market-launch-ready .market-bottom-nav button svg {
    width: 21px !important;
    height: 21px !important;
  }

  body.market-launch-ready .market-bottom-nav button span:last-child {
    font-size: 9px !important;
    font-weight: 700 !important;
    letter-spacing: .01em !important;
  }

  body.market-launch-ready .market-bottom-nav button.is-active {
    color: #f5c400 !important;
    background: rgba(245,196,0,.075) !important;
  }

  html.chart-native-landscape body.market-launch-ready .market-topbar,
  html.chart-native-landscape body.market-launch-ready .market-bottom-nav,
  html.mobile-chart-fullscreen-active body.market-launch-ready .market-topbar,
  html.mobile-chart-fullscreen-active body.market-launch-ready .market-bottom-nav {
    display: none !important;
  }

  body.market-launch-ready #drawingsSheet .market-sheet__panel {
    width: min(100%, 560px) !important;
    height: min(78dvh, 620px) !important;
    max-height: calc(100dvh - 64px) !important;
    padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
    border-radius: 18px 18px 0 0 !important;
  }

  body.market-launch-ready #drawingsSheet .sheet-header {
    min-height: 52px !important;
    padding: 8px 12px !important;
  }

  body.market-launch-ready #drawingsSheet .sheet-header h2 {
    font-size: 17px !important;
  }

  body.market-launch-ready #drawingsSheet .tool-search {
    min-height: 42px !important;
    margin: 0 10px 7px !important;
    border-radius: 11px !important;
  }

  body.market-launch-ready #drawingsSheet .tool-category-tabs {
    padding: 0 10px 6px !important;
  }

  body.market-launch-ready #drawingsSheet .tool-sheet-summary {
    padding: 6px 10px !important;
  }

  body.market-launch-ready #drawingsSheet .tool-grid {
    gap: 7px !important;
    padding: 6px 10px 14px !important;
  }

  body.market-launch-ready #overlayContext {
    gap: 4px !important;
    max-width: calc(100vw - 10px) !important;
    min-height: 42px !important;
    padding: 4px 5px !important;
    border-radius: 11px !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain !important;
    scrollbar-width: none !important;
    -webkit-overflow-scrolling: touch;
  }

  body.market-launch-ready #overlayContext::-webkit-scrollbar {
    display: none !important;
  }

  body.market-launch-ready #overlayContext .context-drag-handle {
    position: sticky !important;
    left: 0 !important;
    z-index: 3 !important;
    flex: 0 0 26px !important;
    width: 26px !important;
    height: 32px !important;
    min-width: 26px !important;
    min-height: 32px !important;
    border-radius: 8px !important;
    background: #0b1017 !important;
    color: #8d98a8 !important;
    touch-action: none !important;
  }

  body.market-launch-ready #overlayContext .overlay-context__identity > span {
    width: 30px !important;
    height: 30px !important;
    min-width: 30px !important;
    font-size: 14px !important;
  }

  body.market-launch-ready #overlayContext .overlay-context__identity strong {
    max-width: 68px !important;
    font-size: 9px !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }

  body.market-launch-ready #overlayContext .context-colors {
    gap: 3px !important;
  }

  body.market-launch-ready #overlayContext .context-colors button {
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    min-height: 24px !important;
  }

  body.market-launch-ready #overlayContext .context-action {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    border-radius: 8px !important;
  }

  body.market-launch-ready #overlayContext .context-action svg {
    width: 17px !important;
    height: 17px !important;
  }

  body.market-launch-ready #overlayContext .context-action--text {
    width: auto !important;
    min-width: 42px !important;
    padding-inline: 7px !important;
  }

  body.market-launch-ready #overlayContext .context-divider {
    height: 26px !important;
    margin-inline: 1px !important;
  }

  body.market-launch-ready .drawing-settings,
  body.market-launch-ready .objects-panel {
    top: 8px !important;
    right: 7px !important;
    bottom: auto !important;
    width: min(86vw, 328px) !important;
    max-width: calc(100vw - 14px) !important;
    height: auto !important;
    max-height: min(76dvh, 580px) !important;
    border-radius: 14px !important;
    overflow: hidden !important;
  }

  body.market-launch-ready .drawing-settings > header,
  body.market-launch-ready .objects-panel > header {
    min-height: 50px !important;
    padding: 8px 10px !important;
  }

  body.market-launch-ready .drawing-settings .settings-scroll,
  body.market-launch-ready .objects-panel .objects-list {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
}

@media (max-width: 380px) {
  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .market-topbar {
    grid-template-columns: 36px minmax(0, 1fr) auto !important;
    gap: 5px !important;
    padding-left: 6px !important;
    padding-right: 6px !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .market-brand__mark {
    display: none !important;
  }

  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .market-back,
  html.market-chart-active:not(.chart-native-landscape):not(.mobile-chart-fullscreen-active)
    body.market-launch-ready .top-action {
    width: 34px !important;
    height: 34px !important;
    min-width: 34px !important;
    min-height: 34px !important;
  }

  body.market-launch-ready #overlayContext .overlay-context__identity strong {
    display: none !important;
  }
}

@supports not (height: 100dvh) {
  @media (max-width: 820px) {
    body.market-launch-ready #drawingsSheet .market-sheet__panel {
      height: min(78vh, 620px) !important;
      max-height: calc(100vh - 64px) !important;
    }
  }
}
