/* Setup & Rules #region */
body,
html,
#nocharts {
  padding: 0;
  margin: 0;
  height: 100%;
  width: 100%;
  min-height: 100%;
  font-family: BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu,
    Cantarell, "Helvetica Neue", sans-serif;
  font-size: 14px;
  color: slategray;
}

.fullscreen {
  position: absolute !important;
  left: 0;
  height: calc(100% - 28px) !important;
  width: 100% !important;
  z-index: 10;
}
a {
  color: inherit;
}
em {
  color: blue !important;
}
button,
.button {
  cursor: pointer;
}
.close-button {
  cursor: pointer;
  right: 17px;
  top: 17px;
  outline: none;
  overflow: visible;
  position: absolute;
  background: #0000;
  border: none;
  border-radius: 4px;
  box-sizing: initial;
  color: #b2b5be;
  margin: 0;
  padding: 8px;
}
.right {
  float: right;
}
.left {
  float: left;
}
.t-center {
  text-align: center;
}
.d-none {
  display: none;
}
.none {
  display: none;
}
.hide {
  display: none !important;
}
#loading.hide,
.desktop-scroll-jump.hide {
  display: none !important;
  transform: none !important;
}
.border-none {
  border: none !important;
  padding: 0 !important;
}
a.ok {
  background: #6c6;
  color: white;
  padding: 0.4em 0.8em;
  border-radius: 0.2em;
  font-size: 1.25em;
}
/* #endregion */
/* Themed #region */
body {
  background: #131722;
  --mcc-scroll-snap-padding: 0px;
  --mcc-chart-gap-y: 0px;
  --mcc-desktop-nav-height: 32px;
}
body.dark {
  background-color: #333;
}
html.desktop-chart-scroll-snap-root,
body.desktop-chart-scroll-snap {
  height: auto;
  min-height: 100%;
  scroll-behavior: smooth;
}
@media screen and (max-width: 899px) {
  body.mcc-mobile-nav-fixed #nav.topnav,
  body.mcc-mobile-nav-fixed .topnav#nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    z-index: 130 !important;
    background: rgba(17, 23, 44, 0.96) !important;
    border-bottom: 1px solid rgba(96, 112, 148, 0.32) !important;
    box-sizing: border-box !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  body.mcc-mobile-nav-fixed #charts {
    margin-top: var(--mcc-mobile-nav-height, var(--mcc-mobile-header-height, 42px));
  }

  /* A promo in #announcement sits between the nav and the charts, so the
     fixed nav's space goes above it instead; otherwise the promo slides under
     the nav and leaves a nav-height gap above the charts. !important beats the
     inline margin:0 the promo script sets. The slot is :empty when no promo
     shows or it was dismissed. */
  body.mcc-mobile-nav-fixed #announcement:not(:empty) {
    margin-top: var(--mcc-mobile-nav-height, var(--mcc-mobile-header-height, 42px)) !important;
  }

  body.mcc-mobile-nav-fixed #announcement:not(:empty) ~ #charts {
    margin-top: 0;
  }
}

@media screen and (min-width: 900px) {
  body.mcc-desktop-nav-fixed #nav.topnav,
  body.mcc-desktop-nav-fixed .topnav#nav {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    z-index: 1000 !important;
    background: rgba(17, 23, 44, 0.96) !important;
    border-bottom: 1px solid rgba(96, 112, 148, 0.32) !important;
    box-sizing: border-box !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  body.mcc-desktop-nav-fixed #charts {
    margin-top: var(--mcc-desktop-nav-height);
  }

  /* See the matching mobile rule above: reserve the fixed nav's space above a
     visible promo rather than above the charts. */
  body.mcc-desktop-nav-fixed #announcement:not(:empty) {
    margin-top: var(--mcc-desktop-nav-height) !important;
  }

  body.mcc-desktop-nav-fixed #announcement:not(:empty) ~ #charts {
    margin-top: 0;
  }

  body.mcc-desktop-scroll-lock-active .box iframe {
    pointer-events: none;
  }

  .desktop-scroll-jump {
    position: fixed;
    z-index: 150;
    display: flex;
    gap: 6px;
    pointer-events: none;
    opacity: 0.48;
    transition: opacity 120ms ease, transform 120ms ease;
  }

  .desktop-scroll-jump:hover,
  .desktop-scroll-jump:focus-within {
    opacity: 1;
  }

  .desktop-scroll-jump button {
    pointer-events: auto;
    border: 1px solid rgba(142, 174, 255, 0.38);
    border-radius: 999px;
    background: rgba(17, 23, 44, 0.58);
    color: rgba(238, 244, 255, 0.86);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1;
    padding: 5px 10px;
    min-width: 44px;
    box-shadow: 0 5px 16px rgba(0, 0, 0, 0.22);
    backdrop-filter: blur(6px);
  }

  .desktop-scroll-jump button:hover,
  .desktop-scroll-jump button:focus-visible {
    border-color: rgba(142, 174, 255, 0.8);
    background: rgba(17, 23, 44, 0.92);
    color: #eef4ff;
  }

  .desktop-scroll-jump-top {
    top: calc(var(--mcc-desktop-nav-height) + 6px);
  }

  .desktop-scroll-jump-bottom {
    bottom: 10px;
    flex-direction: column;
    align-items: center;
  }

  .desktop-scroll-jump-bottom button {
    min-width: 52px;
    padding: 5px 9px;
  }

  .desktop-scroll-jump-placement-center {
    left: 50%;
    transform: translateX(-50%);
  }

  .desktop-scroll-jump-placement-center:hover,
  .desktop-scroll-jump-placement-center:focus-within {
    transform: translateX(-50%) translateY(-1px);
  }

  .desktop-scroll-jump-placement-edge-right {
    left: auto;
    right: var(--mcc-grid-buttons-right-offset, 14px);
    transform: none;
  }

  .desktop-scroll-jump-placement-edge-left {
    left: 14px;
    right: auto;
    transform: none;
  }

  .desktop-scroll-jump-placement-edge-right:hover,
  .desktop-scroll-jump-placement-edge-right:focus-within,
  .desktop-scroll-jump-placement-edge-left:hover,
  .desktop-scroll-jump-placement-edge-left:focus-within {
    transform: translateY(-1px);
  }

  .desktop-scroll-jump-bottom.desktop-scroll-jump-placement-edge-right,
  .desktop-scroll-jump-bottom.desktop-scroll-jump-placement-edge-left {
    bottom: 42px;
  }

  .desktop-scroll-jump.hide {
    display: none;
  }

  .desktop-scroll-jump button.hide {
    display: none;
  }
}

.mobile-scroll-jump {
  position: fixed;
  left: 50%;
  right: auto;
  width: min(96vw, 760px);
  max-width: calc(100vw - 16px);
  bottom: calc(6px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 145;
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 52px;
  padding: 8px 10px;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 999px;
  border: 1px solid rgba(116, 150, 220, 0.34);
  background: rgba(13, 20, 36, 0.98);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.4);
  opacity: 1;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.mobile-scroll-jump.is-idle {
  opacity: 0.72;
}

.mobile-scroll-jump .mobile-scroll-jump-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  appearance: none;
  border: 1px solid #696b76;
  border-radius: 6px;
  background: rgba(54, 56, 67, 0.9);
  color: #ecf1ff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  min-height: 30px;
  padding: 0 8px;
  white-space: nowrap;
  text-transform: none;
  letter-spacing: 0;
}

.mobile-scroll-jump .mobile-scroll-jump-btn:active {
  transform: scale(0.96);
}

.mobile-scroll-jump-side {
  display: flex;
  flex: 1 1 0;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.mobile-scroll-jump-side-left {
  justify-content: flex-end;
}

.mobile-scroll-jump-side-right {
  justify-content: flex-start;
}

.mobile-scroll-jump-center {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 4px;
  border-radius: 999px;
  border: 1px solid rgba(82, 116, 186, 0.45);
  background: rgba(9, 14, 30, 0.92);
  box-shadow: 0 0 0 1px rgba(18, 66, 178, 0.22) inset;
}

.mobile-scroll-jump .mobile-scroll-jump-core-btn {
  min-width: 34px;
  border-radius: 999px;
  border-color: rgba(95, 133, 255, 0.55);
  background: rgba(17, 30, 62, 0.95);
  font-size: 14px;
  padding: 0;
}

.mobile-scroll-jump .mobile-scroll-jump-nav-btn {
  flex: 1 1 0;
  min-width: 0;
  max-width: none;
  min-height: 34px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-scroll-jump .mobile-scroll-jump-btn.hide {
  display: none;
}

.mobile-nav-customize-modal {
  position: fixed;
  inset: 0;
  z-index: 160;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  background: rgba(3, 8, 20, 0.74);
  backdrop-filter: blur(4px);
}

.mobile-nav-customize-card {
  width: min(560px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  border: 1px solid #556280;
  border-radius: 10px;
  background: rgba(23, 28, 43, 0.97);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.42);
  padding: 12px;
}

.mobile-nav-customize-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.mobile-nav-customize-head h4 {
  margin: 0;
  color: #eef4ff;
  font-size: 14px;
}

.mobile-nav-customize-close {
  border: 1px solid #696b76;
  border-radius: 5px;
  background: rgba(54, 56, 67, 0.9);
  color: #ecf1ff;
  padding: 6px 10px;
  font-size: 11px;
}

.mobile-nav-customize-copy {
  margin: 8px 0 12px;
  color: #a8b4d6;
  font-size: 11px;
  line-height: 1.4;
}

body.mcc-phone-rearrange-open {
  overflow: hidden;
}

.mcc-phone-rearrange-modal {
  position: fixed;
  inset: 0;
  z-index: 161;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
  background: rgba(3, 8, 20, 0.78);
  backdrop-filter: blur(6px);
}

.mcc-phone-rearrange-sheet {
  width: min(560px, calc(100vw - 16px));
  max-height: calc(100vh - 16px - env(safe-area-inset-top));
  overflow: hidden;
  border: 1px solid rgba(101, 126, 176, 0.42);
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(24, 31, 49, 0.98), rgba(13, 18, 31, 0.99));
  box-shadow: 0 22px 44px rgba(0, 0, 0, 0.44);
}

.mcc-phone-rearrange-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 14px 8px;
}

.mcc-phone-rearrange-head h4 {
  margin: 0;
  color: #eef4ff;
  font-size: 16px;
}

.mcc-phone-rearrange-head p {
  margin: 4px 0 0;
  color: #aebcdf;
  font-size: 12px;
  line-height: 1.45;
}

.mcc-phone-rearrange-close {
  border: 1px solid rgba(111, 129, 163, 0.72);
  border-radius: 999px;
  background: rgba(49, 58, 79, 0.96);
  color: #eef4ff;
  padding: 7px 12px;
  font-size: 11px;
  font-weight: 700;
}

.mcc-phone-rearrange-meta {
  padding: 0 14px 10px;
  color: #90a2cb;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mcc-phone-rearrange-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: calc(100vh - 152px - env(safe-area-inset-top));
  overflow-y: auto;
  padding: 0 14px calc(14px + env(safe-area-inset-bottom));
}

.mcc-phone-rearrange-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(82, 101, 139, 0.44);
  border-radius: 14px;
  background: rgba(17, 23, 38, 0.9);
  padding: 12px;
}

.mcc-phone-rearrange-row-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.mcc-phone-rearrange-row-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: rgba(70, 100, 160, 0.26);
  color: #dce7ff;
  font-size: 12px;
  font-weight: 700;
}

.mcc-phone-rearrange-row-text {
  min-width: 0;
}

.mcc-phone-rearrange-row-text strong {
  display: block;
  color: #eef4ff;
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.mcc-phone-rearrange-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.mcc-phone-rearrange-btn {
  min-width: 64px;
  border: 1px solid rgba(107, 137, 198, 0.56);
  border-radius: 10px;
  background: rgba(32, 43, 67, 0.96);
  color: #eef4ff;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 700;
}

.mcc-phone-rearrange-btn[disabled] {
  opacity: 0.42;
  cursor: not-allowed;
}

.mcc-phone-rearrange-empty {
  border: 1px dashed rgba(95, 116, 154, 0.45);
  border-radius: 14px;
  background: rgba(17, 23, 38, 0.76);
  color: #b7c5e6;
  padding: 20px 16px;
  text-align: center;
}

.mobile-nav-customize-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.mobile-nav-customize-column {
  border: 1px solid rgba(96, 112, 148, 0.35);
  border-radius: 8px;
  padding: 8px;
  background: rgba(16, 22, 35, 0.74);
}

.mobile-nav-customize-column h5 {
  margin: 0 0 8px;
  color: #d9e5ff;
  font-size: 12px;
}

@media screen and (min-width: 720px) {
  .mobile-nav-customize-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media screen and (max-width: 899px) {
  :root {
    --mcc-mobile-jump-space: 62px;
  }

  .mobile-scroll-jump {
    display: flex;
  }
}

@media screen and (max-width: 480px) {
  .mobile-scroll-jump {
    gap: 6px;
    min-height: 50px;
    padding: 8px 8px;
  }

  .mobile-scroll-jump .mobile-scroll-jump-btn {
    font-size: 10px;
    padding: 0 6px;
  }

  .mcc-phone-rearrange-row {
    grid-template-columns: 1fr;
  }

  .mcc-phone-rearrange-row-actions {
    width: 100%;
  }

  .mcc-phone-rearrange-btn {
    flex: 1 1 0;
    min-width: 0;
  }
}

@media screen and (max-width: 520px) {
  .chart-widget-container {
    overflow: hidden !important;
  }

  .chart-widget-container > * {
    transform: scale(0.9);
    transform-origin: top left;
    width: 111.1111% !important;
    height: 111.1111% !important;
  }
}

.cWhite {
  color: #fff;
}
.cSuperLight {
  color: rgb(253, 246, 246);
}
.cL {
  color: #eee;
}
.cLBlue {
  color: #09f;
}
.tvRed {
  color: rgb(255, 68, 166);
}
.tvGreen {
  color: rgb(15, 116, 255);
}
.fwBold {
  font-weight: bold;
}
#open-modal,
#topnav {
  background-color: #262833;
}
/* .dark .box-button-container a {
	background: none;
} */
/* #endregion */
/* TopNav #region */

#link_set {
  /* font-size: 13px;  */
  color: #eee;
  border-bottom-color: #ddd !important;
  text-decoration: none;
  padding: 3px 6px;
  /* border-bottom: 1px solid; */
}
/* #endreion */
/* Buttons #region */
.button-fullscreen {
  display: block;
  cursor: pointer;
  padding: 4px 8px 6px 8px;
  text-decoration: none;
  color: #fff;
  font-size: 20px;
  opacity: 0.4;
  font-weight: 600;
  border-radius: 4px;
  line-height: 18px;
  background: rgba(0, 106, 206, 0.2);
  margin: 0 2px 4px 2px;
}

.chart-quick-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  line-height: 1;
  font-size: 14px;
  opacity: 0.66;
  border: 1px solid rgba(123, 193, 255, 0.42);
  background: rgba(10, 33, 74, 0.56);
  border-radius: 8px;
  cursor: pointer;
  transition: opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  pointer-events: auto;
}
.chart-quick-btn:hover {
  opacity: 1;
  background: rgba(18, 96, 201, 0.7);
  border-color: rgba(163, 222, 255, 0.92);
  box-shadow: 0 4px 12px rgba(47, 141, 255, 0.3);
}

.chart-quick-btn-danger:hover {
  background: rgba(220, 53, 69, 0.7);
  border-color: rgba(220, 53, 69, 0.92);
  box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
}

.button-multi-timeframe {
  width: 34px;
  opacity: 0.75;
  height: 34px;
  cursor: pointer;
  opacity: 0.5;
}
.small .button-multi-timeframe {
  width: 20px;
  height: 20px;
  margin-left: 6px;
  margin-bottom: -2px;
}
.button {
  display: block;
  cursor: default;
  padding: 7px 12px;
  border: 0.1px solid #dadde0;
  background: #fff;
  height: 14px;
  color: #555;
  font-size: 12px;
  font-weight: 600;
}
.button.toggled {
  border: 3px solid #3bb3e4;
}
/* #endregion */
/* TV Buttons #region */
.tv-btn {
  margin-left: 8px;
  padding: 0.5em 2em;
  vertical-align: middle;
}
.tv-btn:hover {
  background-color: #eee;
  color: black;
}
.tv-btn .dark {
  background-color: #eee;
  color: #333;
}
.tv-btn .dark:hover {
  background-color: #ddd;
  color: black;
}
/* #endregion */
/* Subject To Change #region */
.super-small-icon {
  font-size: 12px;
}
.group.space-single.header-group-indicators {
  display: none;
}
.theme {
  margin: auto;
  text-align: center;
  border-radius: 3px;
  text-decoration: none;
  border: 1px solid #696b76;
  border-bottom-color: #696b76 !important;
  font-size: 12px;
  box-shadow: 0 0 10px #000;
  background: #363843;
  color: #fff;
}
#desktop_chart_buttons_drag_toggle.active {
  box-shadow: 0 0 0.6vw #1041ff, 0 0 1.5vw #1041ff;
  border-color: #6ea4ff;
}

.chart-button-drag-controls {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  min-width: max-content;
  position: relative;
  z-index: 120650;
  overflow: visible;
  gap: 6px;
  margin: auto 0;
}

#desktop_chart_buttons_drag_toggle {
  flex: 0 0 auto;
  flex-shrink: 0;
  margin: 0;
  min-width: 206px;
  width: max-content;
  max-width: none;
  min-height: 30px;
  padding: 6px 12px;
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.chart-button-drag-mode-group {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 2px;
  border: 1px solid #696b76;
  border-radius: 3px;
  background: rgba(22, 24, 31, 0.92);
  box-shadow: 0 0 10px #000;
}

.chart-button-drag-mode-group.is-visible {
  display: inline-flex;
}

.chart-button-visibility-group {
  display: none;
  align-items: center;
  gap: 4px;
  padding: 2px;
  border: 1px solid #696b76;
  border-radius: 3px;
  background: rgba(22, 24, 31, 0.92);
  box-shadow: 0 0 10px #000;
}

.chart-button-visibility-group.is-visible {
  display: inline-flex;
}

.chart-button-visibility-option {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 5px 9px;
  margin: 0;
  min-width: 62px;
  background: transparent;
  color: #d6dff5;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.chart-button-visibility-option:hover:not(:disabled),
.chart-button-visibility-option:focus-visible:not(:disabled) {
  border-color: rgba(142, 176, 255, 0.5);
  background: rgba(52, 71, 118, 0.45);
  color: #f4f8ff;
  outline: none;
}

.chart-button-visibility-option.active {
  border-color: #6ea4ff;
  background: rgba(29, 54, 112, 0.75);
  box-shadow: 0 0 0.45vw #1041ff;
  color: #ffffff;
}

.chart-button-visibility-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.chart-button-drag-mode-option {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 2px;
  padding: 5px 10px;
  margin: 0;
  min-width: 88px;
  background: transparent;
  color: #d6dff5;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.chart-button-drag-mode-option:hover:not(:disabled),
.chart-button-drag-mode-option:focus-visible:not(:disabled) {
  border-color: rgba(142, 176, 255, 0.5);
  background: rgba(52, 71, 118, 0.45);
  color: #f4f8ff;
  outline: none;
}

.chart-button-drag-mode-option.active {
  border-color: #6ea4ff;
  background: rgba(29, 54, 112, 0.75);
  box-shadow: 0 0 0.45vw #1041ff;
  color: #ffffff;
}

.chart-button-drag-mode-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

@media screen and (max-width: 885px) {
  .theme {
    font-size: 9px;
  }

  #desktop_chart_buttons_drag_toggle {
    font-size: 10px;
    min-width: 188px;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
  }
}

@media screen and (max-width: 700px) {
	.theme {
	  font-size: 8px;
	}
  }

button.theme {
  text-transform: uppercase;
  -webkit-transition: 0.3s ease;
  transition: 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
}
button.theme:hover {
  color: hsl(0deg 0% 80%);
  box-shadow: 0 0 1vw #1041ff, 0 0 3vw #1041ff, 0 0 10vw #1041ff,
    0 0 10vw #1041ff, 0 0 0.4vw #8bfdfe, 0vw 0vw 0.1vw #147280;
  background: transparent;
}

#desktop_scroll_lock_toggle.is-active,
#desktop_scroll_lock_toggle[aria-pressed="true"] {
  border-color: #6ea4ff;
  box-shadow: 0 0 0.6vw #1041ff, 0 0 1.5vw #1041ff, 0 0 0.45vw #8bfdfe,
    0vw 0vw 0.1vw #147280;
  background: rgba(17, 23, 44, 0.92);
  color: #eef4ff;
}

#desktop_scroll_lock_toggle.is-active:hover,
#desktop_scroll_lock_toggle[aria-pressed="true"]:hover,
#desktop_scroll_lock_toggle.is-active:focus-visible,
#desktop_scroll_lock_toggle[aria-pressed="true"]:focus-visible {
  border-color: #8eb0ff;
  background: rgba(17, 23, 44, 0.98);
  color: #ffffff;
}
.divLetsGo {
  height: 0;
  position: relative;
  padding-top: 40px;
  margin: auto;
  width: 260px;
  display: flex;
}
.divLetsGo a,
.closeBtn {
  font-size: 25px;
  padding: 5px;
  margin: auto;
  margin-top: 32px;
  background: rgba(32, 48, 80, 0.7);
  border: 1px solid #09f;
  border-radius: 5px;
  color: #ecf0f1;
  text-decoration: none;
  transition: background-color 0.3s;
  width: 69px;
}
#divLetsGo a:hover,
#divLetsGo a:focus {
  background-color: #06c;
}
/* #endregion */
/* Modals #region */
.btn {
  background: #09f;
  color: #fff;
  outline: 0;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-transition: 0.3s ease;
  transition: 0.3s ease;
  -webkit-appearance: none;
  appearance: none;
}
.btn:hover {
  background: #fff;
  color: #da513d;
}
#loading,
#chart_add_select {
  transition: opacity 0.35s ease-in-out, backdrop-filter 0.35s ease-in-out;
}

body.mcc-add-chart-open #add_chart_reveal {
  display: none !important;
}

/* Add Chart panel enter animation: animate inner content so .hide display toggles remain safe. */
#chart_add_select {
  opacity: 1;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  pointer-events: auto;
}

#chart_add_select.hide {
  opacity: 0;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  pointer-events: none;
}

#chart_add_select > #i1d8796bc {
  transform: translateY(22px) scale(0.96);
  opacity: 0;
  will-change: transform, opacity;
}

#chart_add_select:not(.hide) > #i1d8796bc {
  animation: mcc-add-chart-slide-up 380ms cubic-bezier(0.22, 0.8, 0.24, 1) forwards;
}

@keyframes mcc-add-chart-slide-up {
  from {
    transform: translateY(22px) scale(0.96);
    opacity: 0;
  }

  to {
    transform: translateY(0) scale(1);
    opacity: 1;
  }
}

.modalInfo,
.modalConfig,
.modalAd {
  /* opacity: 0;
	visibility: hidden; */
  transition: opacity 0.3s ease-in-out, transform 0.3s cubic-bezier(0.22, 0.8, 0.24, 1), backdrop-filter 0.3s ease-in-out;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: center;
  -ms-flex-pack: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 8, 0.84);
  z-index: 999999;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.modalInfo.hide,
.modalConfig.hide,
.modalAd.hide {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
}
.mAd {
  border-radius: 5px;
  border: 2px solid black;
  background: radial-gradient(
    circle,
    rgba(20, 60, 120, 0.4),
    rgba(4, 6, 24, 0.4)
  );
}
.mAd #url {
  width: 50vw;
  word-wrap: break-word;
  background: transparent;
  border: none;
  color: white;
  font-size: 16px;
}
div.modalConfig > div.hero {
  /* overflow-y: auto; */
  max-height: 100vh;
}
.hero hr {
  border: none;
  background: #eee;
  height: 0.35em;
  margin: 0.8em 0 1.2em 0;
  border-radius: 1em;
}
/* #endregion */
/* PairsSetup #region */

.inputLists {
  margin: 0;
  text-transform: uppercase;
  width: auto;
  padding: 12px;
  line-height: 20px;
}
div.divPairsSetup {
  position: relative;
  max-width: 420px;
  padding-bottom: 20px;
  vertical-align: top;
}
div.divPairsSetup > div {
  display: flex;
  padding: 2px;
  align-items: center;
}
div.divPairsSetup > div > * {
  flex: 18;
}
div.divPairsSetup > div > input {
  flex: 1;
}
div.divPairsSetup input[type="text"],
div.divPairsSetup select {
  -webkit-transition: all 0.3s ease-in-out;
  -moz-transition: all 0.3s ease-in-out;
  -ms-transition: all 0.3s ease-in-out;
  -o-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  outline: none;
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  width: 100%;
  background: #fff;
  margin-bottom: 4%;
  border: 1px solid #ccc;
  padding: 3%;
  color: #555;
  font: 95% Arial, Helvetica, sans-serif;
}
div.divPairsSetup input[type="text"]:focus {
  box-shadow: 0 0 5px #43d1af;
  padding: 3%;
  border: 1px solid #43d1af;
}
div.divPairsSetup input[type="button"],
.inputTypeButton {
  box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  padding: 3%;
  box-shadow: 0 0 8px -2px #000;
  border-top-style: none;
  border-right-style: none;
  border-left-style: none;
  width: 85%;
  margin-left: 6px;
  border-radius: 3px;
  background: #343434;
  color: #f3f3f3;
}
div.divPairsSetup input[type="button"]:hover {
  background: #2ebc99;
}
div.divPairsSetup h3 {
  color: #000;
  background: #eee;
  padding: 8px;
  font-weight: 500;
  text-align: center;
  border-bottom: 6px solid #bbb;
  margin: 0 0 18px 0;
}
/* #endregion */
/* Notif #region */
#notif {
  overflow: hidden;
  position: relative;
  box-sizing: border-box;

  /* width: 100% !important;
	height: auto !important;
	max-height: 600px; */

  background: linear-gradient(#125, #123);
  background: rgb(19, 23, 34);
  color: #fff;
  border-radius: 2px;
  /* padding: 2% 8%; */
  overflow-y: auto;
}
.options {
  /* margin: 12%; */
  background: linear-gradient(#9ac, #09f);
  color: #fff;
  border-radius: 2px;
  padding: 2%;
  overflow-y: auto;
  /* height: 92%; */
}
.options h2 {
  color: rgba(55, 255, 155, 0.6);
  font-size: 16px;
}
.options ul {
  padding: 0;
}
.options li,
.options input {
  background: rgba(0, 0, 0, 0.6);
  background: rgba(85, 85, 85, 0.07);
  text-align: center;
  display: block;
  margin: 6px -1px;
  font-weight: 300;
  padding: 6px;
  border-radius: 3px;
  border: 1px rgba(155, 155, 155, 0.4) solid;
  color: #ddd;
}
#chart_add {
  border: 1px rgba(255, 255, 155, 0.6) solid;
  font-size: 16px;
  padding: 0.6em 0;
  background: rgba(185, 185, 85, 0.125);
  width: auto;
  margin: auto;
}
#chart_options {
  border-radius: 4px;
  border: 1px #ccc solid;
  margin: 1.5em auto;
}
#chart_options li {
  margin: 2px -1px;
  border-radius: 0.15em;
  background: rgba(85, 85, 85, 0.24);
  padding: 0 0.4em;
  font-size: 1.5em;
  display: block;
}
/* #endregion */
/* Unorg #region */
.inputTypeButton {
  display: block;
  cursor: pointer;
  padding: 4px 8px;
  color: #fff;
  height: 36px;
  font-size: 20px;
  font-weight: 600;
  line-height: 18px;
}
.number-label {
  /* margin-left: 4px */
  font-size: 13px;
}
.box-size {
  /* border: 1px solid #696b76; */
  border: none;
  width: 26px;
  /* box-shadow: 0 0 10px #000; */
  /* background: #363843; */
  background: transparent;
  color: #eff;
  color-scheme: dark;
  /* margin: 0 2px; */
  margin-left: 4px;
  /* padding: 2px 0 2px 4px; */
}

.box-size option {
  background: #1f2430;
  color: #eff;
}

#IndGrid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr;
  background: #f8f8f8;
  border-radius: 4px;
  max-height: 260px;
  padding: 0px 20px;
  overflow-y: scroll;
  color: #222;
  align-self: center;
}

@media screen and (max-height: 720px) {
  .modalInfo, .modalConfig, .modalAd {
    overflow-y: scroll;
    overflow-x: clip;
  }
}

@media screen and (max-width: 885px) {
  .t-center {
    padding-top: 20px;
  }

  .number-label {
    font-size: 9px;
  }

  input {
    font-size: 9px;
  }

  #chart_rearrange {
    display: none;
  }
  /* .number-label {
    font-size: 9px;
  }
  input {
    font-size: 9px;
  }

  .box-size {
    width: 10px;
  }

  div.divPairsSetup {
    padding-bottom: 0px;
  }

  #IndGrid {
	  padding: 0;
  }

  div.divPairsSetup br {
	  display: none;
  }

  .t-center {
	  padding-top: 20px;
  } */
}

@media screen and (max-width: 700px) {
	.theme {
	  font-size: 8px;
	}
  }
.label {
  display: inline;
  margin-right: 4px;
  padding: 1px 0 1px 2px;
}
.box {
  position: relative;
  box-sizing: border-box;
  height: calc(100% - 40px);
  width: 100%;
  float: left;
  margin-bottom: var(--mcc-chart-gap-y);
  overflow: visible;
  transition: transform 0.35s cubic-bezier(0.22, 0.8, 0.24, 1),
    box-shadow 0.45s ease, filter 0.45s ease, opacity 0.3s ease;
  will-change: transform, box-shadow, filter;
  display: flex;
  flex-direction: column;
  border-right: 2px solid #131722;
  border-bottom: 2px solid #131722;
}
.chart-widget-container {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  width: 100%;
}
.box:hover,
.box:focus-within {
  z-index: 20;
}
.box.chart-menu-editing {
  z-index: 26;
  box-shadow: inset 0 3px 0 rgba(95, 133, 255, 0.96), 0 0 0 1px rgba(95, 133, 255, 0.78), 0 0 18px rgba(16, 65, 255, 0.22);
}
.box.chart-menu-editing::after {
  content: attr(data-chart-editing-label);
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 16;
  pointer-events: none;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #081a3d;
  background: linear-gradient(135deg, #8bfdfe, #5f85ff);
  box-shadow: 0 0 14px rgba(64, 148, 255, 0.28);
}
.box.chart-stayed-flash {
  animation: chartStayedPulse 1.15s ease;
}
.box.chart-added-flash {
  animation: chartAddedPulse 1.15s ease;
}
.box.chart-stayed-flash::before,
.box.chart-added-flash::before {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 16;
  pointer-events: none;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #081a3d;
  box-shadow: 0 0 14px rgba(64, 148, 255, 0.28);
  animation: chartBadgePop 1.15s ease;
}
.box.chart-stayed-flash::before {
  content: "STAYED";
  background: linear-gradient(135deg, #8bfdfe, #5f85ff);
}
.box.chart-added-flash::before {
  content: "NEW";
  background: linear-gradient(135deg, #b8d3ff, #80a9ff);
}
@keyframes chartBadgePop {
  0% {
    opacity: 0;
    transform: translateY(-6px) scale(0.92);
  }
  20% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  80% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-2px) scale(0.98);
  }
}
@keyframes chartStayedPulse {
  0% {
    box-shadow: inset 0 0 0 0 rgba(79, 125, 255, 0), 0 0 0 0 rgba(79, 125, 255, 0);
    filter: brightness(1);
  }
  35% {
    box-shadow: inset 0 3px 0 0 rgba(139, 253, 254, 0.95), 0 0 0 2px rgba(79, 125, 255, 0.82), 0 0 14px rgba(16, 65, 255, 0.22);
    filter: brightness(1.035) saturate(1.06);
  }
  100% {
    box-shadow: inset 0 0 0 0 rgba(79, 125, 255, 0), 0 0 0 0 rgba(79, 125, 255, 0);
    filter: brightness(1);
  }
}
@keyframes chartAddedPulse {
  0% {
    box-shadow: inset 0 0 0 0 rgba(139, 177, 255, 0), 0 0 0 0 rgba(139, 177, 255, 0);
    filter: brightness(1);
  }
  35% {
    box-shadow: inset 0 0 0 2px rgba(139, 177, 255, 0.95), 0 0 0 2px rgba(104, 160, 255, 0.85), 0 0 18px rgba(16, 65, 255, 0.24);
    filter: brightness(1.04) saturate(1.08);
  }
  100% {
    box-shadow: inset 0 0 0 0 rgba(139, 177, 255, 0), 0 0 0 0 rgba(139, 177, 255, 0);
    filter: brightness(1);
  }
}

/* Chart Control Bar Styles */
.chart-control-bar {
  display: flex;
  align-items: center;
  --mcc-chart-control-inner-height: clamp(14px, calc(var(--mcc-chart-control-bar-height, 15px) - 4px), 31px);
  --mcc-chart-control-btn-size: clamp(16px, calc(var(--mcc-chart-control-bar-height, 15px) - 6px), 28px);
  padding: 0 4px;
  background: #1e222d;
  border-bottom: 1px solid #2a2e39;
  height: var(--mcc-chart-control-bar-height, 15px);
  box-sizing: border-box;
  font-size: 10px;
  color: #b2b5be;
  user-select: none;
  flex-shrink: 0;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Trebuchet MS', Roboto, Ubuntu, sans-serif;
  position: relative;
}

.chart-control-rail {
  display: flex;
  align-items: center;
  gap: 2px;
  width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.chart-control-rail::-webkit-scrollbar {
  display: none;
}

.chart-control-name {
  display: flex;
  align-items: center;
  height: var(--mcc-chart-control-inner-height);
  flex: 0 0 auto;
  min-width: 58px;
  max-width: 120px;
  padding: 0 6px 0 3px;
  font-weight: 600;
  font-size: 10px;
  color: #d1d4dc;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-right: 1px solid #2a2e39;
}

.chart-control-search {
  display: flex;
  flex-direction: column;
  flex: 1 1 96px;
  min-width: 80px;
  max-width: none;
  margin-right: 0;
  position: relative;
}

.chart-control-search-row {
  display: flex;
  align-items: center;
  height: var(--mcc-chart-control-inner-height);
  gap: 4px;
  width: 100%;
  min-width: 0;
}

.chart-control-search-exchange {
  flex: 0 0 auto;
  width: auto;
  max-width: 90px;
  min-width: 42px;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid #2a2e39;
  border-radius: 3px;
  background: #131722 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='8' height='5' viewBox='0 0 8 5'%3E%3Cpath fill='%236a6f7a' d='M0 0l4 5 4-5z'/%3E%3C/svg%3E") no-repeat right 5px center;
  color: #b2b5be;
  font-size: 10px;
  line-height: 1.1;
  height: var(--mcc-chart-control-inner-height);
  padding: 0 15px 0 4px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s ease;
}

.chart-control-search-exchange:hover {
  border-color: #434651;
}

.chart-control-search-exchange:focus {
  border-color: #2962ff;
  background-color: #131722;
}

.chart-control-search-exchange option {
  background: #1e222d;
  color: #b2b5be;
}

.chart-control-search-input-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.chart-control-search-input {
  width: 100%;
  box-sizing: border-box;
  height: var(--mcc-chart-control-inner-height);
  padding: 0 4px;
  border: 1px solid #2a2e39;
  border-radius: 3px;
  background: #131722;
  color: #d1d4dc;
  font-size: 10px;
  outline: none;
  transition: border-color 0.15s ease;
}

.chart-control-search-input::placeholder {
  color: transparent;
}

.chart-control-search-placeholder {
  position: absolute;
  top: 50%;
  left: 5px;
  transform: translateY(-50%);
  right: 0;
  overflow: hidden;
  pointer-events: none;
  white-space: nowrap;
}

.chart-control-search-placeholder-inner {
  display: inline-block;
  color: #6a6f7a;
  font-size: 10px;
  white-space: nowrap;
  animation: placeholder-scroll 9s linear 3s infinite;
}

@keyframes placeholder-scroll {
  0%   { transform: translateX(0); }
  35%  { transform: translateX(0); }
  65%  { transform: translateX(var(--scroll-dist, -50px)); }
  100% { transform: translateX(var(--scroll-dist, -50px)); }
}

.chart-control-search-input:focus {
  background: #131722;
  border-color: #2962ff;
}

.chart-control-search-results {
  background: #1e222d;
  border: 1px solid #2a2e39;
  border-radius: 3px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  max-height: 250px;
  overflow-y: auto;
  z-index: 1000;
}

.chart-control-floating-panel {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 10000;
}

.search-result-item {
  padding: 7px 10px;
  cursor: pointer;
  border-bottom: 1px solid #2a2e39;
  color: #b2b5be;
  transition: background 0.15s ease;
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover:not(.disabled) {
  background: rgba(41, 98, 255, 0.12);
}

.search-result-item.highlighted:not(.disabled) {
  background: rgba(41, 98, 255, 0.22);
  outline: 1px solid rgba(41, 98, 255, 0.4);
}

.search-result-item.disabled {
  cursor: not-allowed;
  color: rgba(255, 255, 255, 0.5);
  pointer-events: none;
}

.search-result-scope-note {
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: 0.01em;
}

.search-result-ticker strong {
  display: block;
  color: #d1d4dc;
  font-size: 12px;
  margin-bottom: 1px;
}

.search-result-indicator {
  background: rgba(41, 98, 255, 0.06);
  border-left: 2px solid rgba(41, 98, 255, 0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.search-result-indicator strong {
  display: block;
  color: #b2b5be;
}

.indicator-content {
  flex: 1;
  cursor: pointer;
}

.search-result-star {
  background: none;
  border: none;
  color: #ffd700;
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  transition: transform 0.15s ease;
  opacity: 0.8;
  flex-shrink: 0;
}

.search-result-star:hover {
  opacity: 1;
  transform: scale(1.1);
}

.search-result-item small {
  display: block;
  color: #6a6f7a;
  font-size: 11px;
}

.chart-control-timeframe {
  display: flex;
  align-items: center;
  position: relative;
  flex: 0 0 auto;
  margin-left: 0;
}

@media screen and (min-width: 1025px) {
  .chart-control-timeframe {
    margin-left: 28px;
  }
}

.chart-control-timeframe-btn {
  height: var(--mcc-chart-control-inner-height);
  padding: 0 5px;
  background: #131722;
  border: 1px solid #2a2e39;
  border-radius: 3px;
  color: #b2b5be;
  font-size: 10px;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
  outline: none;
  min-width: 30px;
  text-align: center;
}

.chart-control-timeframe-btn:hover {
  border-color: #434651;
  color: #d1d4dc;
}

.chart-control-timeframe-btn:active {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(0.98);
}

.chart-control-timeframe-dropdown {
  background: #1e222d;
  border: 1px solid #2a2e39;
  border-radius: 3px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  min-width: 120px;
  overflow-y: auto;
  max-height: 300px;
  z-index: 1000;
}

.chart-control-timeframe-item {
  padding: 7px 12px;
  cursor: pointer;
  border-bottom: 1px solid #2a2e39;
  color: #b2b5be;
  font-size: 12px;
  transition: background 0.15s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.chart-control-timeframe-item:last-child {
  border-bottom: none;
}

.chart-control-timeframe-item:hover {
  background: rgba(41, 98, 255, 0.12);
  color: #d1d4dc;
}

.chart-control-timeframe-item.active {
  background: rgba(41, 98, 255, 0.18);
  color: #2962ff;
  font-weight: 600;
}

.chart-control-timeframe-group-header {
  color: #787b86;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 7px 12px 5px;
  text-transform: uppercase;
  pointer-events: none;
  user-select: none;
}

.timeframe-star {
  background: none;
  border: none;
  color: #787b86;
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
  transition: color 0.15s ease, opacity 0.15s ease, text-shadow 0.15s ease, transform 0.15s ease;
  opacity: 0.3;
}

.timeframe-star:hover {
  opacity: 0.6;
  transform: scale(1.1);
}

.timeframe-star.active {
  opacity: 1;
  color: #ffd700;
  font-size: 14px;
  text-shadow: 0 0 6px rgba(255, 215, 0, 0.6);
  transform: none;
}

.chart-control-timeframe-mode-row {
  background: rgba(41, 98, 255, 0.06);
  border-bottom-color: rgba(66, 97, 168, 0.55);
}

.chart-control-timeframe-mode-buttons {
  display: flex;
  gap: 0.35em;
}

.timeframe-mode-btn {
  cursor: pointer;
  opacity: 1;
  color: #b6c7ee;
  border: 1px solid rgba(95, 142, 255, 0.28);
  border-radius: 999px;
  background: rgba(13, 23, 42, 0.7);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 8px;
  text-transform: uppercase;
}

.timeframe-mode-global {
  border-color: rgba(100, 154, 255, 0.38);
}

.timeframe-mode-custom {
  border-color: rgba(255, 184, 95, 0.38);
  color: #ffd8a0;
}

.timeframe-mode-global.active {
  background: linear-gradient(180deg, #2f5db0 0%, #254780 100%);
  border-color: #6ca1ff;
  box-shadow: 0 0 0 1px rgba(108, 161, 255, 0.28) inset, 0 2px 10px rgba(31, 64, 122, 0.38);
}

.timeframe-mode-custom.active {
  background: linear-gradient(180deg, #7a4f1b 0%, #5f3c12 100%);
  border-color: #ffba66;
  color: #fff4e2;
  box-shadow: 0 0 0 1px rgba(255, 186, 102, 0.26) inset, 0 2px 10px rgba(92, 56, 15, 0.38);
}

.timeframe-mode-global-chip.active {
  border-color: #5f98ff;
  background: #203f79;
  box-shadow: 0 0 0 1px #5f98ff33 inset;
}

.timeframe-mode-custom-chip.active {
  border-color: #ffbf73;
  background: #5e3f16;
  box-shadow: 0 0 0 1px #ffbf7330 inset;
}

.timeframe-mode-btn:hover {
  color: #ffffff;
  border-color: rgba(120, 162, 255, 0.5);
  background: rgba(30, 55, 100, 0.8);
  transform: none;
}

.chart-control-favorites-wrapper {
  position: static;
  display: inline-flex;
  align-items: center;
}

.chart-control-favorites-dropdown {
  background: #1e222d;
  border: 1px solid #2a2e39;
  border-radius: 3px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
  min-width: 200px;
  max-height: 300px;
  overflow-y: auto;
  z-index: 10000;
  pointer-events: auto;
}

.chart-control-favorites-section {
  padding: 8px 0;
  border-bottom: 1px solid #2a2e39;
}

.chart-control-favorites-section:last-child {
  border-bottom: none;
}

.chart-control-favorites-header {
  padding: 6px 12px;
  font-size: 10px;
  font-weight: 600;
  color: #6a6f7a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.chart-control-favorites-item {
  padding: 6px 12px;
  color: #b2b5be;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  transition: background 0.15s ease;
}

.chart-control-favorites-item:hover {
  background: rgba(41, 98, 255, 0.12);
  color: #d1d4dc;
}

.chart-control-favorites-item span {
  flex: 1;
  cursor: pointer;
}

.favorites-remove {
  background: none;
  border: none;
  color: #ff6b6b;
  cursor: pointer;
  font-size: 12px;
  padding: 0;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.chart-control-favorites-item:hover .favorites-remove {
  opacity: 1;
}

.chart-control-favorites-empty {
  padding: 8px 12px;
  color: rgba(255, 255, 255, 0.5);
  font-size: 11px;
  text-align: center;
  font-style: italic;
}

.chart-control-btn-favorites {
  color: #ffd700;
  font-size: 14px;
}

.chart-control-btn-favorites:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: rgba(255, 215, 0, 0.4);
}

.chart-control-indicators {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.chart-control-indicators-btn {
  appearance: none;
  border: 1px solid #2a2e39;
  background: #131722;
  color: #b2b5be;
  border-radius: 3px;
  height: var(--mcc-chart-control-inner-height);
  padding: 0 5px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}

.chart-control-indicators-btn:hover {
  border-color: #434651;
  color: #d1d4dc;
}

.chart-control-indicators-btn:active {
  transform: scale(0.98);
}

.chart-control-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 2px;
  margin-left: auto;
  padding-left: 4px;
  border-left: 1px solid #2a2e39;
  position: relative;
}

.chart-control-bar.is-overflowing::before,
.chart-control-bar.is-overflowing::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 14px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.18s ease;
}

.chart-control-bar.is-overflowing::before {
  left: 0;
  background: linear-gradient(to right, rgba(30, 34, 45, 0.95), rgba(30, 34, 45, 0));
}

.chart-control-bar.is-overflowing::after {
  right: 0;
  background: linear-gradient(to left, rgba(30, 34, 45, 0.95), rgba(30, 34, 45, 0));
}

.chart-control-bar.can-scroll-left::before {
  opacity: 1;
}

.chart-control-bar.can-scroll-right::after {
  opacity: 1;
}

.chart-control-swipe-hint {
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%) translateX(8px);
  opacity: 0;
  pointer-events: none;
  z-index: 4;
  height: 14px;
  line-height: 14px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid rgba(41, 98, 255, 0.4);
  background: rgba(8, 17, 38, 0.88);
  color: #9fc0ff;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chart-control-swipe-hint.is-visible {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
  animation: chart-control-swipe-hint-nudge 1.1s ease-in-out infinite;
}

@keyframes chart-control-swipe-hint-nudge {
  0% {
    transform: translateY(-50%) translateX(0);
  }
  50% {
    transform: translateY(-50%) translateX(-4px);
  }
  100% {
    transform: translateY(-50%) translateX(0);
  }
}

.chart-control-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: var(--mcc-chart-control-btn-size);
  height: var(--mcc-chart-control-btn-size);
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 2px;
  color: #787b86;
  cursor: pointer;
  font-size: 10px;
  transition: color 0.15s ease, border-color 0.15s ease;
  outline: none;
}

.chart-control-btn:hover {
  color: #b2b5be;
  border-color: #2a2e39;
  background: rgba(255,255,255,0.06);
}

.chart-control-btn:active {
  transform: scale(0.95);
  background: rgba(255, 255, 255, 0.2);
}

.chart-control-btn-fullscreen:hover {
  color: #2962ff;
  border-color: rgba(41, 98, 255, 0.3);
  background: rgba(41, 98, 255, 0.1);
}

.chart-control-btn-close:hover {
  color: #e53935;
  border-color: rgba(229, 57, 53, 0.3);
  background: rgba(229, 57, 53, 0.1);
}

@media screen and (max-width: 1024px) {
  .chart-control-search {
    min-width: 90px;
  }

  .chart-control-timeframe {
    margin-left: 0;
  }

  .chart-control-search-exchange {
    min-width: 42px;
    font-size: 10px;
    padding: 1px 2px;
  }
}

@media screen and (max-width: 1310px) {
  .chart-control-search-row {
    gap: 0;
  }

  .chart-control-search-exchange {
    display: none;
  }

  .chart-control-search {
    min-width: 0;
  }
}

@media screen and (max-width: 640px) {
  .chart-control-rail {
    gap: 4px;
  }

  .chart-control-name {
    max-width: 120px;
    font-size: 10px;
  }

  .chart-control-search {
    min-width: 80px;
    max-width: 150px;
  }

  .chart-control-timeframe {
    margin-left: 0;
  }

  .chart-control-search-exchange {
    min-width: 40px;
    font-size: 10px;
    padding: 1px 2px;
  }

  .chart-control-indicators-btn {
    padding: 1px 4px;
    font-size: 10px;
  }
}

.box.mobil > div {
  width: 60% !important; /* 55% */
  height: 60% !important; /* 55% */
  transform: scale(1.6) translateY(20%); /* 1.8 22% */
}
.box-button-container {
  position: absolute;
  top: var(--chart-menu-top, 42px);
  left: var(--chart-menu-left, 14px);
  right: var(--chart-menu-right, auto);
  bottom: var(--chart-menu-bottom, auto);
  z-index: 12;
  display: grid;
  grid-template-rows: auto;
  justify-items: start;
  align-content: start;
  gap: 8px;
  opacity: 0.72;
  overflow: visible;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
body.chart-button-drag-mode .box-button-container {
  cursor: grab;
  pointer-events: auto;
  padding: 4px;
  border-radius: 10px;
  outline: 1px dashed rgba(255, 210, 120, 0.92);
  background: rgba(255, 210, 120, 0.08);
  box-shadow: 0 0 0 1px rgba(255, 210, 120, 0.25), 0 0 16px rgba(255, 173, 66, 0.26);
  animation: chart-button-drag-hint 1.25s ease-in-out infinite;
}
body.chart-button-drag-mode .box-button-container.dragging {
  opacity: 1;
  cursor: grabbing;
  animation: none;
}
body.chart-button-drag-mode .box-button-container > * {
  opacity: 0.58 !important;
  filter: grayscale(0.45) saturate(0.8);
  cursor: not-allowed;
  pointer-events: none;
  border-color: rgba(255, 210, 120, 0.75) !important;
  box-shadow: 0 0 0 1px rgba(255, 210, 120, 0.25);
}
body.chart-button-drag-mode .box-button-container::after {
  content: "DRAG";
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #ffd272;
  background: rgba(15, 22, 35, 0.88);
  border: 1px solid rgba(255, 210, 120, 0.6);
  border-radius: 999px;
  padding: 1px 6px;
  pointer-events: none;
}
body.chart-button-drag-mode .box-button-container.dragging::after {
  content: "DROP";
}
@keyframes chart-button-drag-hint {
  0%,
  100% {
    box-shadow: 0 0 0 1px rgba(255, 210, 120, 0.2), 0 0 10px rgba(255, 173, 66, 0.18);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(255, 210, 120, 0.38), 0 0 24px rgba(255, 173, 66, 0.35);
  }
}
.box:hover .box-button-container,
.box:focus-within .box-button-container,
.box-button-container.menu-open {
  opacity: 1;
}
.box-button-container.menu-open {
  z-index: 24;
}
.box.compact-chart-controls .box-button-container {
  gap: 8px;
  opacity: 1;
}
.box.compact-chart-controls .box-button-container .chart-quick-btn {
  display: inline-flex;
}
.box[data-menu-side="right"] .box-button-container {
  justify-items: end;
}
.box[data-menu-anchor="off"] .box-button-container {
  display: none !important;
}
.chart-menu-toggle {
  width: 28px;
  min-width: 0;
  max-width: 28px;
  height: 28px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  line-height: 1;
  box-sizing: border-box;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: #eef6ff;
  opacity: 0.68;
  border: 1px solid rgba(123, 193, 255, 0.42);
  background: linear-gradient(135deg, rgba(10, 33, 74, 0.56), rgba(18, 96, 201, 0.5));
  box-shadow: 0 8px 16px rgba(37, 113, 255, 0.12);
  backdrop-filter: blur(8px);
  pointer-events: auto;
}
.chart-menu-toggle:hover,
.chart-menu-toggle.open {
  opacity: 1;
  border-color: rgba(163, 222, 255, 0.92);
  box-shadow: 0 10px 26px rgba(47, 141, 255, 0.42);
}
.chart-menu-toggle-icon {
  display: block;
  font-size: 13px;
  line-height: 1;
  transform: translateY(-0.5px);
}
.chart-menu-toggle-label {
  font-size: 10px;
  text-transform: uppercase;
  white-space: nowrap;
}
.chart-menu-toggle-label:empty {
  display: none;
}
.chart-menu-overlay {
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(2, 7, 16, 0.34);
  z-index: 130;
  transition: opacity 0.2s ease, backdrop-filter 0.2s ease;
  opacity: 0;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
  pointer-events: none;
}
.chart-menu-overlay.open {
  display: block;
  opacity: 1;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: auto;
}
.chart-menu-popover {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  display: none;
  width: min(520px, calc(100vw - 28px));
  min-width: min(340px, calc(100vw - 28px));
  max-width: min(520px, calc(100vw - 28px));
  max-height: min(76vh, 680px);
  border: 1px solid rgba(75, 106, 164, 0.72);
  border-radius: 14px;
  background: rgba(8, 18, 36, 0.97);
  box-shadow: 0 20px 42px rgba(0, 0, 0, 0.66);
  overflow: hidden;
  pointer-events: auto;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.22, 0.8, 0.24, 1);
  opacity: 0;
  transform: scale(0.92);
}
.box[data-menu-side="right"] .chart-menu-popover {
  left: auto;
  right: 0;
}
.box[data-menu-anchor^="bottom"] .chart-menu-popover {
  top: auto;
  bottom: calc(100% + 6px);
}
.chart-menu-popover.open {
  display: block;
  position: fixed;
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  transform: translate(-50%, -50%) scale(1);
  z-index: 140;
  opacity: 1;
}
.chart-menu-dialog {
  width: 100%;
  max-height: min(76vh, 680px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}
.chart-menu-header {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 10px 8px;
  border-bottom: 1px solid #223253;
}
.chart-menu-header-copy {
  flex: 1;
  min-width: 0;
}
.chart-menu-header-actions {
  display: flex;
  gap: 4px;
  align-items: center;
  flex-shrink: 0;
}
.chart-menu-header-btn {
  appearance: none;
  border: 1px solid #3b4f78;
  background: #131c31;
  color: #e8f0ff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.chart-menu-header-btn:hover {
  background: #1b2844;
}
.chart-menu-header-btn.danger {
  border-color: #7a2a2a;
  color: #ff9090;
}
.chart-menu-header-btn.danger:hover {
  background: #2a1010;
  border-color: #c04040;
}

.chart-menu-body {
  display: grid;
  gap: 10px;
  min-height: 0;
  max-height: min(calc(76vh - 60px), 620px);
  padding: 10px;
  overflow-y: auto;
}
.chart-menu-close {
  appearance: none;
  border: 1px solid #3b4f78;
  background: #131c31;
  color: #e8f0ff;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 11px;
  font-weight: 700;
}
.chart-menu-close:hover {
  background: #1b2844;
}
.chart-menu-title {
  color: white;
  font-size: 12px;
  font-weight: 700;
  word-break: break-word;
}
.chart-menu-meta {
  color: #9db1dd;
  font-size: 11px;
  line-height: 1.35;
  margin: 0;
}
.chart-menu-section {
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #223253;
  border-radius: 12px;
  background: rgba(11, 19, 34, 0.86);
}
.chart-menu-popover[data-menu-view="indicators-only"] [data-menu-section="interval"],
.chart-menu-popover[data-menu-view="indicators-only"] [data-menu-section="range"] {
  display: none;
}
.chart-menu-section-title {
  color: #e5eeff;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.chart-menu-section-copy {
  color: #91a7d7;
  font-size: 11px;
  line-height: 1.35;
}
.chart-preset-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chart-preset-chip {
  appearance: none;
  border: 1px solid #31456f;
  background: #131c31;
  color: white;
  border-radius: 999px;
  padding: 5px 8px;
  font-size: 11px;
  line-height: 1.2;
}
.chart-preset-chip:hover {
  background: #1b2844;
}
.chart-preset-chip.active {
  border-color: #4f7dff;
  background: #1c315f;
  box-shadow: 0 0 0 1px #4f7dff33 inset;
  color: #f5f8ff;
  font-weight: 700;
}

.chart-preset-chip.timeframe-mode-global-chip.active {
  border-color: #5f98ff;
  background: #203f79;
  box-shadow: 0 0 0 1px #5f98ff33 inset;
}

.chart-preset-chip.timeframe-mode-custom-chip.active {
  border-color: #ffbf73;
  background: #5e3f16;
  box-shadow: 0 0 0 1px #ffbf7330 inset;
  color: #fff4e2;
}
.chart-indicator-search {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #31456f;
  border-radius: 8px;
  background: #10192d;
  color: white;
  padding: 7px 9px;
  font-size: 12px;
}
.chart-selected-indicators {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chart-selected-indicator {
  appearance: none;
  border: 1px solid #3a5587;
  background: #18284a;
  color: white;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  line-height: 1.2;
}
.chart-indicator-scroll-body {
  display: grid;
  gap: 8px;
  overflow-y: auto;
  max-height: min(32vh, 240px);
  padding-right: 2px;
}
.chart-indicator-results {
  display: grid;
  gap: 6px;
}
.chart-indicator-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 4px 0;
  border-bottom: 1px solid #1f2e4b;
}
.chart-indicator-item:last-child {
  border-bottom: none;
}
.chart-indicator-item-copy {
  display: grid;
  gap: 2px;
}
.chart-indicator-item-copy strong {
  color: white;
  font-size: 11px;
}
.chart-indicator-item-copy small {
  color: #8ea7d8;
  font-size: 10px;
  line-height: 1.3;
}
.chart-indicator-empty {
  color: #8ea7d8;
  font-size: 11px;
  line-height: 1.35;
  padding: 2px 0;
}
.chart-menu-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  padding-top: 4px;
  border-top: 1px solid #223253;
}
.chart-menu-action {
  appearance: none;
  border: 1px solid #31456f;
  background: #131c31;
  color: white;
  border-radius: 8px;
  padding: 7px 9px;
  text-align: left;
  font-size: 12px;
}
.chart-menu-action:hover {
  background: #1b2844;
}
@media (max-width: 640px) {
  .chart-menu-popover {
    width: min(94vw, 420px);
    min-width: min(94vw, 320px);
    max-width: min(94vw, 420px);
    max-height: min(72vh, 560px);
  }
  .chart-menu-body {
    max-height: min(calc(72vh - 56px), 500px);
  }
  .chart-menu-actions {
    grid-template-columns: 1fr;
  }
}
.chart-menu-action.danger {
  border-color: #7a3a47;
  color: #ffb4c0;
}
.newsletter {
  text-align: center;
  background: rgb(19, 23, 34);
  height: 100%;
  /* border: 4px solid rgb(227,232,247); */
  border: 4px solid rgb(33, 37, 52);
  overflow-y: auto;
}
.black-serif {
  font-family: "Times New Roman", Times, serif;
}
.ad {
  margin-left: 25px;
  border: 5px;
  box-shadow: 0 0 10px #000;
  text-align: center;
  border-radius: 3px;
  text-decoration: none;
  padding-left: 9px;
  padding-right: 9px;
  font-family: Lato, sans-serif;
  background: #09fc;
  color: #fff;
}
.ad:hover {
  background: #fff;
  color: #da513d;
}
::-webkit-scrollbar {
  width: 7px;
  background: transparent;
}
::-webkit-scrollbar-track {
  border-radius: 25px;
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.8);
  border-radius: 25px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 0, 0, 0.5);
}

.autocomplete {
  /*the container must be positioned relative:*/
  position: relative;
  display: inline-block;
}
.autocomplete-items {
  width: 28px;
  height: 28px;
  top: 100%;
  left: 0;
  right: 0;
  font-size: 14px;
/* ============== MOBILE OPTIMIZATION STYLES ============== */

/* Mobile Hamburger Menu */
  border-radius: 8px;
  display: none;
  flex-direction: column;
  margin-left: auto;
  position: relative;
  z-index: 100;
}

.mobile-menu-toggle {
  display: none;
  appearance: none;
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.mobile-menu-icon {
  display: none;
  flex-direction: column;
  width: 44px;
  height: 44px;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  gap: 5px;
  padding: 8px;
}

.mobile-menu-icon span {
  display: block;
  width: 24px;
  height: 3px;
  background-color: #eff;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-toggle:checked ~ .mobile-menu-icon span:nth-child(1) {
  transform: rotate(45deg) translate(3px, 4px);
}

.mobile-menu-toggle:checked ~ .mobile-menu-icon span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle:checked ~ .mobile-menu-icon span:nth-child(3) {
  transform: rotate(-45deg) translate(8px, -8px);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 50px;
  right: 0;
  width: 100%;
  max-width: 300px;
  background: rgba(30, 30, 45, 0.98);
  backdrop-filter: blur(10px);
  border-left: 1px solid #696b76;
  max-height: calc(100vh - 50px);
  overflow-y: auto;
  z-index: 140;
  box-shadow: -2px 0 10px rgba(0, 0, 0, 0.4);
  animation: slideInFromRight 0.3s ease;
}

@keyframes slideInFromRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.mobile-menu-toggle:checked ~ .mobile-menu {
  display: block;
}

.mobile-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #696b76;
  background: rgba(20, 20, 30, 0.95);
}

.mobile-menu-header h3 {
  margin: 0;
  color: #eff;
  font-size: 16px;
}

.mobile-menu-close {
  background: none;
  border: none;
  color: #eff;
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s;
}

.mobile-menu-close:hover {
  color: #fff;
}

.mobile-menu-section {
  padding: 15px;
  border-bottom: 1px solid #555;
}

.mobile-menu-section h4 {
  margin: 0 0 10px 0;
  color: #aac;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
  font-weight: 600;
}

.mobile-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid rgba(105, 107, 118, 0.3);
}

.mobile-menu-item:last-child {
  border-bottom: none;
}

.mobile-menu-item label {
  color: #ccc;
  font-size: 13px;
  cursor: pointer;
}

.mobile-menu-item input[type="number"],
.mobile-menu-item input[type="checkbox"],
.mobile-menu-item select {
  min-width: 44px;
  min-height: 44px;
  padding: 6px;
  background: rgba(50, 50, 60, 0.8);
  border: 1px solid #696b76;
  color: #eff;
  border-radius: 3px;
  cursor: pointer;
}

.mobile-select {
  width: 132px;
}

.mobile-input {
  width: 50px !important;
}

.mobile-grid-select {
  width: 88px !important;
}

.mobile-menu-note {
  margin: 8px 0 12px;
  font-size: 12px;
  line-height: 1.35;
  color: #a8b4d6;
}

.mobile-menu-note-link {
  color: #d9e6ff;
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 600;
}

.mobile-menu-note-link:hover,
.mobile-menu-note-link:focus-visible {
  color: #ffffff;
}

.mobile-menu-toggle-item label {
  flex: 1;
}

.mobile-menu-button {
  display: block;
  width: 100%;
  padding: 12px;
  margin-bottom: 8px;
  background: linear-gradient(135deg, rgba(54, 56, 67, 0.9), rgba(100, 110, 130, 0.8));
  color: #eff;
  border: 1px solid #696b76;
  border-radius: 4px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  min-height: 44px;
}

.mobile-menu-button:hover {
  background: linear-gradient(135deg, rgba(70, 75, 90, 0.95), rgba(120, 130, 150, 0.9));
  border-color: #aac;
}

.mobile-menu-button:active {
  transform: scale(0.98);
}

/* Mobile Toggle Button */
.mobile-toggle-btn {
  background: #4CAF50;
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
  margin-right: 5px;
  transition: background 0.2s;
  min-height: 44px;
  min-width: 44px;
}

@media (min-width: 1311px) {
  .mobile-toggle-btn {
    display: none !important;;
  }
}

.mobile-toggle-btn:hover {
  background: #45a049;
}

.mobile-toggle-btn.active {
  background: #2196F3;
}

/* Mobile Notification Banner */
.mobile-notification {
  position: fixed;
  top: var(--mcc-notification-top, calc(var(--mcc-desktop-nav-height) + 10px));
  left: 50%;
  right: auto;
  width: calc(100vw - 16px);
  max-width: 760px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(17, 23, 44, 0.98), rgba(25, 32, 58, 0.96));
  color: #eef4ff;
  padding: 13px 46px 13px 16px;
  font-size: 13px;
  z-index: 145;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(110, 164, 255, 0.14);
  animation: slideDown 0.3s ease;
  border-radius: 14px;
  border: 1px solid rgba(110, 164, 255, 0.34);
  box-sizing: border-box;
  backdrop-filter: blur(10px);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.22);
}

.notification-copy {
  flex: 1 1 auto;
  min-width: 0;
  text-align: center;
}

.notification-title {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #8eb0ff;
}

#notificationText {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: #f3f7ff;
  overflow-wrap: anywhere;
}

.notification-actions {
  margin-top: 8px;
  display: flex;
  justify-content: center;
}

.notification-actions.hide {
  display: none;
}

.notification-action-btn {
  appearance: none;
  border: 1px solid rgba(142, 176, 255, 0.48);
  border-radius: 999px;
  background: rgba(35, 54, 103, 0.9);
  color: #eef4ff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.2;
  padding: 6px 12px;
  cursor: pointer;
}

.notification-action-btn:hover,
.notification-action-btn:focus-visible {
  border-color: rgba(142, 176, 255, 0.82);
  background: rgba(45, 72, 138, 0.95);
}

@keyframes slideDown {
  from {
    transform: translateX(-50%) translateY(-14px);
    opacity: 0;
  }
  to {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
  }
}

.mobile-notification.hide {
  display: none;
}

.close-notification {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(238, 244, 255, 0.18);
  border-radius: 999px;
  color: #eef4ff;
  font-size: 18px;
  cursor: pointer;
  padding: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
}

.close-notification:hover {
  background: rgba(142, 176, 255, 0.18);
  border-color: rgba(142, 176, 255, 0.45);
}

/* Desktop navbar fit/condense before mobile breakpoint */
@media screen and (min-width: 900px) {
  body.chart-button-drag-mode #nav.topnav,
  body.chart-button-drag-mode .topnav#nav {
    overflow: visible;
    z-index: 120650;
  }

  #nav.topnav,
  .topnav#nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-wrap: nowrap;
    overflow: hidden;
    white-space: nowrap;
    box-sizing: border-box;
    padding: 3px 6px;
  }

  /* Keep nav compact by default, but allow dropdown menus to float above chart iframes. */
  #nav.topnav:has(.dropdown:hover),
  .topnav#nav:has(.dropdown:hover) {
    overflow: visible;
    z-index: 120400;
  }

  #nav.topnav .dropdown,
  .topnav#nav .dropdown {
    position: relative;
    z-index: 120500;
  }

  #nav.topnav .dropdown .dropdown-content,
  .topnav#nav .dropdown .dropdown-content {
    z-index: 120600 !important;
  }

  #nav.topnav > *,
  .topnav#nav > * {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
  }

  #nav.topnav > #desktop_chart_buttons_drag_controls,
  .topnav#nav > #desktop_chart_buttons_drag_controls {
    flex: 0 0 auto;
    min-width: max-content;
    max-width: none;
    position: relative;
    z-index: 120650;
  }

  #nav.topnav > a,
  .topnav#nav > a {
    display: inline-flex;
    min-width: 0;
    max-width: 100%;
  }

  #nav.topnav .theme,
  .topnav#nav .theme,
  #nav.topnav .dropdown > button,
  .topnav#nav .dropdown > button {
    margin: 0;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #nav.topnav .label,
  .topnav#nav .label {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    margin: 0;
    padding: 1px 4px;
  }

  #nav.topnav .box-size,
  .topnav#nav .box-size {
    margin-left: 2px;
  }

  #nav.topnav .mcc-chart-save-status,
  .topnav#nav .mcc-chart-save-status {
    margin-left: 0;
  }

  #desktop_scroll_lock_toggle,
  #desktop_grid_buttons_toggle,
  #desktop_chart_buttons_drag_toggle {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #desktop_chart_buttons_drag_toggle {
    max-width: none;
    min-width: 206px;
    overflow: visible;
    text-overflow: clip;
  }
}

@media screen and (min-width: 1311px) and (max-width: 1760px) {
  #nav.topnav,
  .topnav#nav {
    gap: 3px;
    padding: 2px 4px;
  }

  #nav.topnav .theme,
  .topnav#nav .theme,
  #nav.topnav .dropdown > button,
  .topnav#nav .dropdown > button {
    font-size: 10px;
    line-height: 1.1;
    padding: 3px 6px;
  }

  #nav.topnav .dropdown > button,
  .topnav#nav .dropdown > button {
    width: auto;
  }

  #nav.topnav .number-label,
  .topnav#nav .number-label {
    font-size: 11px;
  }

  #nav.topnav .mcc-chart-save-profile-select,
  .topnav#nav .mcc-chart-save-profile-select {
    max-width: 96px;
  }

  #desktop_scroll_lock_toggle,
  #desktop_grid_buttons_toggle,
  #desktop_chart_buttons_drag_toggle {
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  #desktop_chart_buttons_drag_toggle {
    max-width: none;
    min-width: 206px;
    overflow: visible;
    text-overflow: clip;
  }
}

@media screen and (min-width: 1311px) and (max-width: 1520px) {
  #nav.topnav .theme,
  .topnav#nav .theme,
  #nav.topnav .dropdown > button,
  .topnav#nav .dropdown > button {
    font-size: 9px;
    padding: 2px 5px;
  }

  #nav.topnav .number-label,
  .topnav#nav .number-label {
    font-size: 10px;
  }

  #nav.topnav .mcc-chart-save-profile-select,
  .topnav#nav .mcc-chart-save-profile-select {
    max-width: 84px;
  }
}

/* ============== 1310px MOBILE BREAKPOINT ============== */
@media screen and (max-width: 1310px) {
  :root {
    --mcc-mobile-btn-height: 34px;
    --mcc-mobile-btn-gap: 4px;
    --mcc-mobile-btn-radius: 5px;
    --mcc-mobile-header-height: 42px;
  }

  #desktop_chart_buttons_drag_toggle {
    display: none !important;
  }

  #desktop_chart_buttons_drag_controls {
    display: none !important;
  }

  /* Show Mobile Menu */
  .mobile-menu-container {
    display: flex;
  }

  .mobile-notification {
    top: var(--mcc-notification-top, calc(var(--mcc-mobile-header-height) + 8px));
  }

  .mobile-menu-icon {
    display: flex;
    padding: 0.4em !important;
    cursor: pointer;
  }

  .topnav > #mobileMenuContainer {
    display: flex !important;
    margin-left: auto !important;
    order: 2;
    min-height: var(--mcc-mobile-btn-height);
    align-items: center;
  }
  .topnav > a,
  .topnav > #live_movers_reveal,
  .topnav > #profiles_reveal,
  .topnav > .label,
  .topnav > button:not(.mobile-nav-slot),
  .topnav > select,
  .topnav > div:not(#mobileMenuContainer):not(#modalConfig):not(#modalIndicators):not(#modalAd):not(#chart_add_select):not(#liveMoversPanel):not(#profilesPanel) {
    display: none !important;
  }

  .topnav > .mobile-nav-slot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: var(--mcc-mobile-btn-height);
    padding: 0.22em 0.5em !important;
    font-size: 9px !important;
    line-height: 1.1 !important;
    border-radius: var(--mcc-mobile-btn-radius) !important;
    min-width: 72px;
    max-width: 108px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 !important;
    background: rgba(54, 56, 67, 0.88);
    border: 1px solid #696b76;
    color: #ecf1ff;
  }

  body.mcc-mobile-nav-editing #nav.topnav,
  body.mcc-mobile-nav-editing .topnav#nav {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    z-index: 170 !important;
  }

  .topnav > .mobile-nav-slot:hover {
    transform: scale(0.95);
  }

  /* Adjust topnav for mobile */
  #nav.topnav,
  .topnav#nav {
    position: -webkit-sticky !important;
    position: sticky !important;
    top: 0 !important;
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
  }

  .topnav {
    padding: 4px 6px !important;
    max-width: 100vw;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: var(--mcc-mobile-btn-gap);
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    min-height: var(--mcc-mobile-header-height);
    z-index: 130;
    background: rgba(17, 23, 44, 0.95);
    box-sizing: border-box;
    border-bottom: 1px solid rgba(96, 112, 148, 0.32);
  }

  .topnav::-webkit-scrollbar {
    display: none;
  }

  /* Keep compact header: these controls live inside hamburger menu */
  #mobileToggleButton {
    display: none !important;
  }

  #mobile_navbar_buttons_anchor_toggle {
    display: none !important;
  }

  .mobile-menu-icon {
    width: var(--mcc-mobile-btn-height);
    height: var(--mcc-mobile-btn-height);
    min-height: var(--mcc-mobile-btn-height);
    border: 1px solid #696b76;
    border-radius: var(--mcc-mobile-btn-radius);
    background: rgba(54, 56, 67, 0.9);
  }

  .topnav > #mobileMenuContainer {
    flex: 0 0 auto;
    margin-left: auto !important;
  }

  .mobile-menu {
    max-height: calc(100vh - var(--mcc-mobile-header-height));
    z-index: 140;
  }

  /* Adjust chart grid to prevent overflow */
  #charts {
    width: 100%;
    padding: 0 0 10px;
    gap: 0 !important;
    row-gap: 0 !important;
    column-gap: 0 !important;
  }

  body {
    --mcc-chart-gap-y: 0px;
  }

  .box {
    margin: 0;
    border-radius: 0;
    border-right-width: 0;
    border-bottom-width: 0;
  }

  body::-webkit-scrollbar {
    width: 14px;
  }

  body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(150, 163, 184, 0.72);
    border: 3px solid rgba(22, 24, 35, 0.9);
  }

  /* Adjust modal sizes for mobile */
  .modalInfo,
  .modalConfig,
  .modalAd {
    width: 95vw !important;
    max-width: 95vw !important;
    left: 2.5vw !important;
  }

  /* Reduce font sizes further */
  .theme {
    margin: 0;
    font-size: 10px;
  }

  .mobile-menu button,
  .mobile-menu input,
  .mobile-menu select {
    min-height: 44px;
  }

  /* Hamburger menu positioning */
  .mobile-menu-container {
    margin-left: auto;
  }

  @media screen and (min-width: 920px) {
    .topnav {
      flex-wrap: nowrap;
      overflow-x: hidden;
    }

    .topnav > .mobile-nav-slot {
      flex: 0 0 auto;
      min-width: 88px;
    }

    .topnav > #mobileMenuContainer {
      margin-left: auto !important;
    }
  }

  @media screen and (max-width: 640px) {
    .topnav > .mobile-nav-slot {
      min-width: 70px;
      max-width: 94px;
    }

    .topnav > #mobileMenuContainer {
      margin-left: auto !important;
    }
  }

  .mobile-menu-item #mobileNavbarTopSlot1Select,
  .mobile-menu-item #mobileNavbarTopSlot2Select,
  .mobile-menu-item #mobileNavbarTopSlot3Select,
  .mobile-menu-item #mobileNavbarTopSlot4Select,
  .mobile-menu-item #mobileNavbarBottomSlot1Select,
  .mobile-menu-item #mobileNavbarBottomSlot2Select,
  .mobile-menu-item #mobileNavbarBottomSlot3Select,
  .mobile-menu-item #mobileNavbarBottomSlot4Select {
    width: 158px;
  }
}

/* ============== SMALLER MOBILE (600px) ============== */
@media screen and (max-width: 600px) {
  .mobile-menu {
    max-width: 100%;
    width: 100%;
  }

  .mobile-notification {
    top: calc(var(--mcc-mobile-header-height) + 8px);
    width: calc(100vw - 12px);
    padding: 12px 42px 12px 14px;
    font-size: 12px;
    border-radius: 12px;
  }

  .notification-action-btn {
    font-size: 10px;
    padding: 6px 10px;
  }

  .notification-title {
    font-size: 10px;
  }

  .mobile-menu-button {
    font-size: 12px;
    padding: 10px;
  }

  .theme {
    font-size: 9px;
  }
}

.autocomplete-items div {
  padding: 8px 14px;
  cursor: pointer;
  background-color: #222;
  border-bottom: 1px solid #4d4d4d;
}
.autocomplete-items div:hover {
  /*when hovering an item:*/
  background-color: #777;
}
.autocomplete-active {
  /*when navigating through the items using the arrow keys:*/
  background-color: DodgerBlue !important;
  color: #ffffff;
}

.mcc-chart-save-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  padding: 2px 6px;
  border: 1px solid rgba(118, 135, 170, 0.5);
  border-radius: 8px;
  background: rgba(16, 24, 43, 0.62);
  color: #d7e6ff;
  vertical-align: middle;
}

.mcc-chart-save-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #f4b942;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
  flex: 0 0 auto;
}

.mcc-chart-save-status[data-state="saved"] .mcc-chart-save-dot {
  background: #49d17c;
}

.mcc-chart-save-status[data-state="unsaved"] .mcc-chart-save-dot {
  background: #f4b942;
}

.mcc-chart-save-btn {
  margin: 0 !important;
  padding: 4px 8px !important;
  min-height: 0 !important;
  font-size: 10px !important;
}

.mcc-chart-save-profile-select {
  margin: 0 !important;
  padding: 4px 6px !important;
  min-height: 0 !important;
  font-size: 10px !important;
  max-width: 132px;
}

@media screen and (max-width: 1024px) {
  .mcc-chart-save-status {
    margin-left: 0;
    min-width: 0;
  }

  .mcc-chart-save-profile-select {
    max-width: 112px;
  }
}

.mcc-debug-open {
  overflow: hidden;
}

.mcc-debug-overlay {
  position: fixed;
  inset: 0;
  z-index: 120000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(3, 8, 20, 0.78);
  backdrop-filter: blur(6px);
}

.mcc-debug-panel {
  width: min(1180px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  border: 1px solid #2f4775;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(11, 17, 34, 0.98), rgba(8, 13, 27, 0.98));
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(122, 156, 231, 0.18) inset;
  color: #e6efff;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.mcc-debug-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid #25385f;
  padding: 12px 14px;
  background: rgba(15, 24, 46, 0.95);
}

.mcc-debug-title-wrap {
  min-width: 0;
}

.mcc-debug-title-wrap h3 {
  margin: 0;
  font-size: 16px;
  line-height: 1.25;
  color: #f2f7ff;
}

.mcc-debug-title-wrap small {
  display: block;
  margin-top: 4px;
  color: #9eb2d8;
  font-size: 11px;
  line-height: 1.35;
}

.mcc-debug-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mcc-debug-expand-btn {
  min-width: 76px;
}

.mcc-debug-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 12px 12px 14px;
  overflow: auto;
  align-content: start;
  flex: 1;
  min-height: 0;
}

.mcc-debug-card {
  border: 1px solid rgba(79, 111, 168, 0.5);
  border-radius: 10px;
  background: rgba(12, 20, 40, 0.86);
  padding: 14px;
  min-height: 110px;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mcc-debug-card h4 {
  margin: 0 0 12px;
  color: #e8f0ff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mcc-debug-card pre {
  margin: 0;
  max-height: 38vh;
  overflow: auto;
  padding: 12px;
  border-radius: 8px;
  background: rgba(5, 10, 22, 0.92);
  border: 1px solid rgba(79, 111, 168, 0.35);
  color: #d0e0ff;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 12px;
  line-height: 1.6;
  flex: 1;
  min-height: 0;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.mcc-debug-card-full {
  grid-column: 1 / -1;
}

.mcc-debug-card-full pre {
  max-height: 55vh;
  font-size: 12px;
  line-height: 1.6;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.mcc-debug-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 7px 10px;
}

.mcc-debug-summary > div {
  border: 1px solid rgba(79, 111, 168, 0.4);
  border-radius: 8px;
  padding: 9px 11px;
  background: rgba(8, 14, 30, 0.82);
  color: #dde8ff;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}

.mcc-debug-chart-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.mcc-debug-input {
  width: min(440px, 100%);
  border: 1px solid rgba(106, 140, 207, 0.6);
  border-radius: 8px;
  background: rgba(5, 11, 25, 0.95);
  color: #d8e8ff;
  padding: 8px 10px;
  font-size: 12px;
  box-sizing: border-box;
}

.mcc-debug-input:focus-visible {
  outline: 2px solid rgba(118, 167, 255, 0.58);
  outline-offset: 1px;
}

.mcc-debug-chart-counts {
  color: #a7bddf;
  font-size: 11px;
}

.mcc-debug-chart-list {
  display: grid;
  gap: 10px;
  max-height: 65vh;
  overflow: auto;
}

.mcc-debug-chart-card {
  border: 1px solid rgba(82, 115, 176, 0.55);
  border-radius: 10px;
  background: rgba(9, 16, 32, 0.86);
  padding: 12px;
  box-shadow: inset 0 0 0 1px rgba(20, 37, 74, 0.35);
}

.mcc-debug-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  padding: 6px;
  border-radius: 6px;
  transition: background-color 0.15s ease;
}

.mcc-debug-chart-head:hover {
  background-color: rgba(79, 111, 168, 0.15);
}

.mcc-debug-chart-head h5 {
  margin: 0;
  color: #ffffff;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.3;
  word-break: break-word;
}

.mcc-debug-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.mcc-debug-badge {
  border-radius: 999px;
  border: 1px solid rgba(98, 130, 193, 0.65);
  background: rgba(21, 34, 63, 0.9);
  color: #dfe9ff;
  padding: 3px 9px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  display: inline-block;
}

.mcc-debug-badge.is-ok {
  border-color: rgba(73, 209, 124, 0.65);
  color: #b8f5cf;
}

.mcc-debug-badge.is-warn {
  border-color: rgba(244, 185, 66, 0.72);
  color: #ffe4a6;
}

.mcc-debug-kv {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 13px;
  color: #d5e3ff;
  line-height: 1.6;
}

.mcc-debug-kv strong {
  color: #f2f7ff;
}

.mcc-debug-line {
  font-size: 13px;
  color: #d5e3ff;
  margin-bottom: 6px;
  line-height: 1.6;
}

.mcc-debug-ok {
  color: #b9f4ce;
}

.mcc-debug-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.mcc-debug-pill {
  border: 1px solid rgba(104, 138, 205, 0.6);
  border-radius: 999px;
  background: rgba(17, 29, 55, 0.88);
  color: #e0ecff;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1.5;
  display: inline-block;
}

.mcc-debug-pill-muted {
  opacity: 0.8;
}

.mcc-debug-overrides {
  display: grid;
  gap: 6px;
}

.mcc-debug-override {
  border: 1px solid rgba(244, 185, 66, 0.45);
  border-radius: 7px;
  background: rgba(40, 30, 5, 0.4);
  padding: 8px 10px;
  display: grid;
  gap: 4px;
}

.mcc-debug-override > span {
  font-size: 12px;
  color: #ffe2a0;
  font-weight: 700;
}

.mcc-debug-override > code {
  font-size: 12px;
  color: #fff3d4;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.mcc-debug-override > small {
  color: #d0e0f8;
  font-size: 11px;
  line-height: 1.5;
}

.mcc-debug-empty {
  border: 1px dashed rgba(96, 125, 184, 0.58);
  border-radius: 8px;
  padding: 14px;
  color: #c0d5f2;
  background: rgba(9, 17, 35, 0.72);
  font-size: 13px;
  line-height: 1.6;
}

.mcc-debug-json-details {
  margin-top: 10px;
}

.mcc-debug-json-details > summary {
  cursor: pointer;
  user-select: none;
  color: #cde0ff;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 8px 8px;
  border-radius: 6px;
  margin: -8px -8px 0 -8px;
  transition: background-color 0.15s ease;
}

.mcc-debug-json-details > summary:hover {
  background-color: rgba(79, 111, 168, 0.2);
}

.mcc-debug-json-details[open] > summary {
  margin-bottom: 8px;
}

.mcc-debug-json-details pre {
  max-height: 60vh;
  font-size: 12px;
  line-height: 1.6;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
}

.mcc-debug-panel.is-expanded .mcc-debug-card pre,
.mcc-debug-panel.is-expanded .mcc-debug-card-full pre,
.mcc-debug-panel.is-expanded .mcc-debug-chart-list,
.mcc-debug-panel.is-expanded .mcc-debug-json-details pre {
  max-height: none;
  overflow: visible;
}

@media screen and (max-width: 980px) {
  .mcc-debug-overlay {
    padding: 8px;
  }

  .mcc-debug-panel {
    width: 100%;
    max-height: calc(100vh - 16px);
    border-radius: 10px;
  }

  .mcc-debug-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .mcc-debug-grid {
    grid-template-columns: 1fr;
    padding: 8px;
  }

  .mcc-debug-card-full {
    grid-column: auto;
  }

  .mcc-debug-card pre {
    max-height: 34vh;
  }

  .mcc-debug-chart-list {
    max-height: 40vh;
  }
}
/* #endregion */

/* ============== ULTRAWIDE (3440px) ============== */
@media screen and (min-width: 3440px) {
  /* Optimize for ultrawide displays (21:9 aspect ratio) */
  
  /* Allow more space for navigation items at extreme widths */
  #nav.topnav,
  .topnav#nav {
    gap: 6px;
    padding: 4px 8px;
  }

  #nav.topnav .theme,
  .topnav#nav .theme,
  #nav.topnav .dropdown > button,
  .topnav#nav .dropdown > button {
    font-size: 13px;
    padding: 5px 10px;
  }

  /* Increase modal max-widths for better readability on ultrawide */
  .modalInfo,
  .modalConfig,
  .modalAd {
    max-width: 1200px !important;
  }

  /* Optimize control bar for ultrawide */
  .chart-control-bar {
    font-size: 13px;
  }

  .theme {
    font-size: 12px;
  }

  /* Improve spacing on search and control elements */
  #chart_adder {
    font-size: 18px;
  }

  /* Optimize mobile nav customization grid for wider screens */
  .mobile-nav-customize-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  /* Better utilization of width for fixed panels */
  #liveMoversPanel,
  #profilesPanel {
    --dock-panel-width: clamp(400px, 32vw, 550px);
  }

  /* Optimize debug panel for ultrawide */
  .mcc-debug-panel {
    width: min(1400px, calc(100vw - 40px));
  }

  .mcc-debug-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Ensure chart grids can use available width efficiently */
  #chart_add_select #i1d8796bc {
    width: min(1100px, calc(100vw - 30px));
    grid-template-columns: 1fr 1fr 1fr;
  }

  #chart_add_select #i1d8796bc .chart-add-close-row {
    grid-column: 1 / -1;
  }

  /* Improve scroll jump buttons positioning on ultrawide */
  .desktop-scroll-jump {
    gap: 8px;
  }

  .desktop-scroll-jump button {
    min-width: 50px;
    padding: 6px 12px;
  }
}

/* ============== EDGE CASE: Short viewport height (1280x1200 & similar) ============== */
@media screen and (max-height: 900px) and (min-width: 1200px) {
  /* For unusually tall-aspect resolutions like 1280x1200 (1:1 ratio) */
  
  /* Reduce top spacing to prevent nav from covering content */
  #top_space {
    height: 60px;
  }

  /* More compact modal sizing */
  .modalInfo,
  .modalConfig,
  .modalAd {
    max-height: 95vh;
    min-height: auto;
  }

  .hero {
    max-height: calc(95vh - 40px);
  }

  /* Reduce modal padding */
  .modalInfo > div,
  .modalConfig > div,
  .modalAd > div {
    padding: 12px;
  }

  /* Compact buttons in modals */
  .divPairsSetup .theme {
    padding: 4px 8px;
    font-size: 10px;
  }

  /* Optimize chart spacing for short screens */
  #charts {
    padding: 0 0 5px;
  }
}

.box-button-container > *:hover {
  opacity: 1;
  transition: 0.2s;
}

select:disabled {
  opacity: 0.4;
}
