body.tg-embed-desktop-mode #tgPreviewCountdown,
body.tg-embed-desktop-mode [data-preview-continue],
body.tg-embed-desktop-mode .nav-pill-signin[href="/login"],
body.tg-embed-desktop-mode #levPanel,
body.tg-embed-desktop-mode .fav-row,
body.tg-embed-desktop-mode #tgPhoneFavoritesCurtain,
body.tg-embed-desktop-mode #tgHeaderBar {
  display: none !important;
}

body.tg-embed-desktop-mode {
  margin-top: 0 !important;
  padding-top: 0 !important;
  overflow-y: auto;
}

body.tg-embed-desktop-mode #tgAppShell {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

body.tg-embed-desktop-mode #tgControlsPanel {
  margin-top: 0 !important;
}

body.tg-embed-desktop-mode .tg-embed-hidden-control {
  display: none !important;
}

#tgEmbedCtaOverlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(5, 10, 20, 0.66);
  backdrop-filter: blur(6px);
  z-index: 99999;
}
#tgEmbedCtaOverlay.tg-open { display: flex; }
#tgEmbedCtaOverlay .tg-embed-card {
  width: min(520px, 92vw);
  border-radius: 16px;
  border: 1px solid rgba(96, 165, 250, .35);
  background: linear-gradient(180deg, rgba(9,18,30,.95), rgba(8,15,25,.95));
  padding: 18px;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
#tgEmbedCtaOverlay .tg-embed-card h3 { margin: 0 0 8px; }
#tgEmbedCtaOverlay .tg-embed-card p { margin: 0 0 12px; color: #c7d2e0; }
#tgEmbedCtaOverlay .tg-embed-card a {
  display: inline-block;
  text-decoration: none;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg,#2563eb,#14c38e);
}
#tgEmbedCtaOverlay .tg-embed-card small { display: block; margin-top: 10px; color: #9fb3c8; }

body.tg-embed-desktop-mode .tg-embed-control-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
body.tg-embed-desktop-mode .tg-embed-control-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
body.tg-embed-desktop-mode .tg-embed-assets {
  position: relative;
}
body.tg-embed-desktop-mode .tg-embed-asset-guide {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 2px;
  min-height: 36px;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(99, 102, 241, .26);
  background: linear-gradient(135deg, rgba(20, 30, 52, .62), rgba(12, 20, 36, .58));
  color: #c9d8ea;
  font-size: .76rem;
  font-weight: 760;
  letter-spacing: .01em;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, .10), 0 6px 14px rgba(0, 0, 0, .16);
  pointer-events: none;
  user-select: none;
  animation: tgEmbedAssetGuidePulse 2.6s ease-in-out infinite;
}
body.tg-embed-desktop-mode .tg-embed-asset-guide__text--compact {
  display: none;
}
body.tg-embed-desktop-mode .tg-embed-asset-guide__arrow {
  position: relative;
  width: 22px;
  height: 3px;
  background: linear-gradient(90deg, rgba(129, 140, 248, .26), rgba(147, 197, 253, .94));
  border-radius: 999px;
  animation: tgEmbedAssetArrowNudge 2.6s ease-in-out infinite;
}
body.tg-embed-desktop-mode .tg-embed-asset-guide__arrow::after {
  content: '';
  position: absolute;
  right: -2px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 2.5px solid rgba(147, 197, 253, .95);
  border-right: 2.5px solid rgba(147, 197, 253, .95);
  transform: translateY(-50%) rotate(45deg);
}

@keyframes tgEmbedAssetGuidePulse {
  0%, 100% { opacity: .88; }
  50% { opacity: 1; }
}

@keyframes tgEmbedAssetArrowNudge {
  0%, 100% { transform: translateX(0); }
  45% { transform: translateX(0); }
  65% { transform: translateX(3px); }
}


body.tg-embed-desktop-mode .tg-embed-soft-pulse {
  animation: tgEmbedSoftPulse 1.15s ease-out 1;
}

@keyframes tgEmbedSoftPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0), 0 0 0 0 rgba(129, 140, 248, 0);
    filter: brightness(1);
  }
  35% {
    box-shadow: 0 0 0 4px rgba(96, 165, 250, .24), 0 0 20px rgba(129, 140, 248, .32);
    filter: brightness(1.04);
  }
  100% {
    box-shadow: 0 0 0 10px rgba(96, 165, 250, 0), 0 0 0 rgba(129, 140, 248, 0);
    filter: brightness(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  body.tg-embed-desktop-mode .tg-embed-soft-pulse {
    animation: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.tg-embed-desktop-mode .tg-embed-asset-guide,
  body.tg-embed-desktop-mode .tg-embed-asset-guide__arrow {
    animation: none !important;
  }
}
body.tg-embed-desktop-mode .tg-embed-control-btn {
  background: rgba(15, 23, 35, 0.72);
  border: 1px solid rgba(148, 163, 184, 0.28);
  color: #e8eef6;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
body.tg-embed-desktop-mode .tg-embed-control-btn:hover {
  border-color: rgba(96, 165, 250, .55);
}
body.tg-embed-desktop-mode .tg-embed-control-btn[data-active="1"] {
  border-color: rgba(37, 99, 235, .78);
  box-shadow: 0 0 0 1px rgba(37, 99, 235, .3), 0 10px 24px rgba(0, 0, 0, .32);
  background: rgba(18, 31, 48, .88);
}

body.tg-embed-desktop-mode .tg-embed-asset-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  min-width: 150px;
}
body.tg-embed-desktop-mode .tg-embed-asset-icon {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: .78rem;
  font-weight: 900;
  color: #f8fafc;
  background: linear-gradient(135deg, rgba(59,130,246,.8), rgba(99,102,241,.8));
}
body.tg-embed-desktop-mode .tg-embed-asset-btn[data-symbol="BTC/USDT"] .tg-embed-asset-icon {
  background: linear-gradient(135deg, rgba(245,158,11,.85), rgba(234,88,12,.85));
}
body.tg-embed-desktop-mode .tg-embed-asset-btn[data-symbol="XAU/USD"] .tg-embed-asset-icon {
  background: linear-gradient(135deg, rgba(234,179,8,.85), rgba(202,138,4,.85));
}
body.tg-embed-desktop-mode .tg-embed-asset-copy {
  display: grid;
  min-width: 0;
}
body.tg-embed-desktop-mode .tg-embed-asset-copy .sym {
  font-size: .86rem;
  font-weight: 800;
  line-height: 1.1;
}
body.tg-embed-desktop-mode .tg-embed-asset-copy .sub {
  font-size: .72rem;
  color: #9fb3c8;
  line-height: 1.1;
}

body.tg-embed-desktop-mode .tg-embed-timeframes {
  margin-left: 2px;
}

body.tg-embed-desktop-mode .tg-embed-control-cta {
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 320px;
  flex: 1 1 360px;
}
body.tg-embed-desktop-mode .tg-embed-control-cta-copy {
  min-width: 0;
  text-align: right;
}
body.tg-embed-desktop-mode .tg-embed-control-cta-line1 {
  color: #e7efff;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.2;
}
body.tg-embed-desktop-mode .tg-embed-control-cta-line2,
body.tg-embed-desktop-mode .tg-embed-control-cta-compact {
  color: #d4e2f3;
  font-size: .82rem;
  font-weight: 700;
  line-height: 1.22;
}
body.tg-embed-desktop-mode .tg-embed-control-cta-compact {
  display: none;
}
body.tg-embed-desktop-mode .tg-embed-control-cta-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  white-space: nowrap;
  border-radius: 999px;
  padding: 8px 14px;
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .02em;
  color: #eef4ff;
  border: 1px solid rgba(124, 58, 237, .62);
  background: linear-gradient(135deg, rgba(76, 29, 149, .94), rgba(37, 99, 235, .92));
  box-shadow: 0 10px 22px rgba(0, 0, 0, .34), 0 0 0 1px rgba(124, 58, 237, .24), inset 0 0 16px rgba(129, 140, 248, .18);
  transition: transform .15s ease, filter .15s ease, box-shadow .15s ease, border-color .15s ease;
}
body.tg-embed-desktop-mode .tg-embed-control-cta-btn:hover {
  border-color: rgba(147, 197, 253, .72);
  filter: brightness(1.05);
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(0, 0, 0, .42), 0 0 0 1px rgba(96, 165, 250, .34), inset 0 0 20px rgba(125, 211, 252, .18);
}
body.tg-embed-desktop-mode .tg-embed-control-cta-btn:focus-visible {
  outline: 2px solid rgba(147, 197, 253, .9);
  outline-offset: 2px;
}
body.tg-embed-desktop-mode .tg-embed-tf-btn {
  border-radius: 999px;
  padding: 7px 12px;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .03em;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #expInterval option[data-embed-gated="1"],
body.tg-embed-desktop-mode:not(.tg-phone-handset) option.tg-embed-gated-option {
  color: #7f8ea3;
  opacity: .72;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) [data-itv].tg-embed-gated-option,
body.tg-embed-desktop-mode:not(.tg-phone-handset) [data-interval].tg-embed-gated-option,
body.tg-embed-desktop-mode:not(.tg-phone-handset) [data-timeframe].tg-embed-gated-option {
  color: #7f8ea3 !important;
  opacity: .72;
  cursor: not-allowed !important;
}

body.tg-embed-desktop-mode {
  --tg-embed-chart-height: 680px;
  --tg-embed-canvas-height: clamp(760px, 82vh, 900px);
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgNewsPanel,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #embedTeaserPanel {
  display: none !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) .grid.tg-grid {
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr) !important;
  align-items: start;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgLeftCol {
  display: block;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgChartPanel {
  min-height: max(var(--tg-embed-canvas-height), var(--tg-embed-equal-panel-height, 0px));
  height: var(--tg-embed-equal-panel-height, auto);
  display: flex;
  flex-direction: column;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgChartPanel #chartDock {
  flex: 1 1 auto;
  min-height: 0;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgRightPanel {
  height: auto;
  max-height: none;
  min-height: var(--tg-embed-chart-height);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: visible;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgRightPanel > * {
  min-height: 0;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #assetOverview {
  flex: 0 0 auto;
  margin-bottom: 0 !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap {
  flex: 1 1 auto;
  min-height: fit-content;
  margin-bottom: 0 !important;
  overflow: visible;
  padding: 10px 12px 16px !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap .tg-tuning {
  margin-bottom: 4px !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap .tg-tuning-box {
  padding: 4px 8px !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap .tg-tuning-box .row {
  margin-top: 1px !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap .tg-tuning-box .mix-head {
  margin-bottom: 1px !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap .mix-foot {
  margin-top: 0 !important;
  min-height: 18px !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap .decision-slider-row {
  gap: 5px !important;
  min-height: 24px !important;
  align-items: center !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap .decision-slider-left,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap .decision-slider-right {
  min-height: 18px !important;
  gap: 4px !important;
  line-height: 1.05 !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap #riskSlider,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap #analysisMixSlider {
  height: 8px !important;
  margin: 0 !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap #riskSlider::-webkit-slider-thumb,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap #analysisMixSlider::-webkit-slider-thumb {
  width: 13px !important;
  height: 13px !important;
  margin-top: -2px !important;
  border-width: 1px !important;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .35), 0 2px 6px rgba(0, 0, 0, .24) !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap #riskSlider::-moz-range-thumb,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap #analysisMixSlider::-moz-range-thumb {
  width: 13px !important;
  height: 13px !important;
  border-width: 1px !important;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, .35), 0 2px 6px rgba(0, 0, 0, .24) !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap .decision-slider-left .muted,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap .decision-slider-right .muted,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap #analysisMixLabel {
  font-size: .76rem !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap #riskPct {
  min-height: 18px !important;
  padding: 1px 6px !important;
  font-size: .71rem !important;
  line-height: 1.1 !important;
  border-width: 1px !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap #analysisMixReset {
  padding: 3px 8px !important;
  font-size: .72rem !important;
  margin-top: 0 !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #analysis,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #boxTA,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #boxFA {
  display: none !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) .tg-embed-outlook-actions {
  margin-top: 8px;
  display: grid;
  gap: 6px;
  position: static;
  overflow: visible;
  padding-bottom: 4px;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgEmbedOutlookActions,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgEmbedOutlookActions .tg-embed-cta-grid {
  max-height: none !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) .tg-embed-outlook-actions__title {
  color: #cdd7e6;
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .015em;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) .tg-embed-cta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) .tg-embed-cta {
  text-align: left;
  width: 100%;
  display: grid;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(99, 102, 241, .42);
  background: linear-gradient(180deg, rgba(14, 24, 44, .94), rgba(8, 16, 30, .94));
  color: #edf3ff;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, .34),
    0 0 0 1px rgba(59, 130, 246, .18),
    inset 0 0 24px rgba(99, 102, 241, .11);
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease, filter .15s ease;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) .tg-embed-cta--primary {
  border-color: rgba(124, 58, 237, .55);
  background: linear-gradient(135deg, rgba(32, 21, 60, .96), rgba(16, 32, 60, .96));
  box-shadow:
    0 12px 28px rgba(0, 0, 0, .4),
    0 0 0 1px rgba(124, 58, 237, .26),
    inset 0 0 34px rgba(99, 102, 241, .16);
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) .tg-embed-cta:hover {
  border-color: rgba(96, 165, 250, .72);
  box-shadow:
    0 14px 30px rgba(0, 0, 0, .45),
    0 0 0 1px rgba(96, 165, 250, .35),
    inset 0 0 36px rgba(99, 102, 241, .22);
  transform: translateY(-1px);
  filter: brightness(1.03);
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) .tg-embed-cta:focus-visible {
  outline: 2px solid rgba(96, 165, 250, .8);
  outline-offset: 2px;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) .tg-embed-cta__kicker {
  font-size: .84rem;
  font-weight: 800;
  line-height: 1.2;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) .tg-embed-cta__desc {
  color: #b7c6da;
  font-size: .73rem;
  line-height: 1.25;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) .tg-embed-cta__action {
  color: #dbeafe;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .01em;
}

@media (max-width: 1160px) {
  body.tg-embed-desktop-mode:not(.tg-phone-handset) .tg-embed-cta-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1320px) {
  body.tg-embed-desktop-mode .tg-embed-asset-guide__text--full {
    display: none;
  }
  body.tg-embed-desktop-mode .tg-embed-asset-guide__text--compact {
    display: inline;
  }
  body.tg-embed-desktop-mode .tg-embed-control-cta {
    flex-basis: 300px;
    min-width: 280px;
  }
  body.tg-embed-desktop-mode .tg-embed-control-cta-line2 {
    display: none;
  }
  body.tg-embed-desktop-mode .tg-embed-control-cta-compact {
    display: block;
  }
}

@media (max-width: 1160px) {
  body.tg-embed-desktop-mode .tg-embed-asset-guide {
    display: none;
  }
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #saveAnalysisBtn {
  display: none !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgEmbedPanelModal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(5, 10, 20, .62);
  backdrop-filter: blur(6px);
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgEmbedPanelModal[data-open="1"] {
  display: flex;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) .tg-embed-modal-card {
  width: min(880px, 96vw);
  max-height: min(86vh, 860px);
  border-radius: 14px;
  border: 1px solid rgba(96, 165, 250, .34);
  background: linear-gradient(180deg, rgba(8, 14, 24, .98), rgba(8, 13, 22, .98));
  box-shadow: 0 26px 62px rgba(0, 0, 0, .46);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) .tg-embed-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, .22);
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) .tg-embed-modal-title {
  font-weight: 800;
  font-size: .95rem;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) .tg-embed-modal-close {
  width: 30px;
  height: 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .35);
  background: rgba(15, 23, 35, .75);
  color: #dbe7f5;
  font-size: 1rem;
  cursor: pointer;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgEmbedPanelModalBody {
  padding: 12px;
  overflow: auto;
  min-height: 0;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgEmbedPanelModalBody #analysis,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgEmbedPanelModalBody #boxTA,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgEmbedPanelModalBody #boxFA {
  display: block !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgEmbedPanelModalBody #boxTA,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgEmbedPanelModalBody #boxFA {
  margin: 0 !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgEmbedPanelModalBody #boxTA > summary,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgEmbedPanelModalBody #boxFA > summary {
  display: none;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgEmbedPanelModalBody .tg-embed-empty {
  color: #9fb3c8;
  font-size: .9rem;
}

@media (max-height: 760px) {
  body.tg-embed-desktop-mode:not(.tg-phone-handset) #decisionWrap {
    overflow-y: auto;
  }
}

/* Embed-only cleanup: remove tail content below the desktop preview box. */
body.tg-embed-desktop-mode:not(.tg-phone-handset) #status,
body.tg-embed-desktop-mode:not(.tg-phone-handset) .tg-policy-footer,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgLegalModal,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #jdai,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #ga-chat,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #glassyFab,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgai-fab,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #tg-assist-dock,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgGlassyNudge,
body.tg-embed-desktop-mode:not(.tg-phone-handset) .glassy-fab,
body.tg-embed-desktop-mode:not(.tg-phone-handset) .tgai-fab,
body.tg-embed-desktop-mode:not(.tg-phone-handset) [data-glassy-fab],
body.tg-embed-desktop-mode:not(.tg-phone-handset) [data-tgai="fab"],
body.tg-embed-desktop-mode:not(.tg-phone-handset) [data-tg-glassy-nudge-mounted] {
  display: none !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
  min-height: 0 !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgAppShell,
body.tg-embed-desktop-mode:not(.tg-phone-handset) main,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgControlsPanel {
  margin-bottom: 0 !important;
  padding-bottom: 0 !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgAppShell > :last-child,
body.tg-embed-desktop-mode:not(.tg-phone-handset) #tgAppShell > :last-child > :last-child {
  margin-bottom: 0 !important;
}

body.tg-embed-desktop-mode[data-page="dashboard"] #tgDesktopEmbedGlassyPortal {
  position: fixed;
  inset: 0;
  z-index: 180;
  pointer-events: none;
  overflow: visible;
  contain: layout style;
}

body.tg-embed-desktop-mode[data-page="dashboard"] #tgDesktopEmbedGlassyPill {
  position: fixed;
  z-index: 181;
  pointer-events: auto !important;
  display: inline-flex;
  align-items: center;
  gap: 15px;
  min-height: 82px;
  min-width: 250px;
  padding: 14px 20px 14px 16px;
  border-radius: 24px;
  border: 1.5px solid rgba(168, 85, 247, .62);
  background:
    radial-gradient(circle at 24% 28%, rgba(168, 85, 247, .36), transparent 42%),
    linear-gradient(135deg, rgba(18, 24, 38, .96), rgba(12, 17, 29, .94));
  color: #fff;
  box-shadow:
    0 0 42px rgba(168, 85, 247, .54),
    0 20px 58px rgba(0, 0, 0, .52);
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  backdrop-filter: blur(16px);
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}

body.tg-embed-desktop-mode[data-page="dashboard"] #tgDesktopEmbedGlassyPill,
body.tg-embed-desktop-mode[data-page="dashboard"] #tgDesktopEmbedGlassyPill * {
  pointer-events: auto !important;
}

body.tg-embed-desktop-mode[data-page="dashboard"] #tgDesktopEmbedGlassyPill:hover {
  transform: translateY(-1px);
  border-color: rgba(192, 132, 252, .82);
  box-shadow:
    0 0 34px rgba(168, 85, 247, .52),
    0 16px 40px rgba(0, 0, 0, .5);
}

body.tg-embed-desktop-mode[data-page="dashboard"] #tgDesktopEmbedGlassyPill .tg-desktop-embed-glassy-mark {
  width: 54px;
  height: 54px;
  border-radius: 17px;
  display: grid;
  place-items: center;
  background: rgba(124, 58, 237, .18);
  box-shadow: inset 0 0 16px rgba(168, 85, 247, .28);
}

body.tg-embed-desktop-mode[data-page="dashboard"] #tgDesktopEmbedGlassyPill .tg-desktop-embed-glassy-mark img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

body.tg-embed-desktop-mode[data-page="dashboard"] #tgDesktopEmbedGlassyPill .tg-desktop-embed-glassy-copy {
  display: grid;
  gap: 4px;
  text-align: left;
}

body.tg-embed-desktop-mode[data-page="dashboard"] #tgDesktopEmbedGlassyPill strong {
  font-size: 1.22rem;
  line-height: 1.05;
  font-weight: 950;
}

body.tg-embed-desktop-mode[data-page="dashboard"] #tgDesktopEmbedGlassyPill small {
  font-size: .82rem;
  line-height: 1.05;
  color: rgba(203, 213, 225, .88);
}

@media (max-width: 1100px) {
  body.tg-embed-desktop-mode[data-page="dashboard"] #tgDesktopEmbedGlassyPill {
    min-height: 68px;
    min-width: 215px;
    padding: 11px 16px 11px 13px;
    border-radius: 21px;
    gap: 12px;
  }

  body.tg-embed-desktop-mode[data-page="dashboard"] #tgDesktopEmbedGlassyPill .tg-desktop-embed-glassy-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
  }

  body.tg-embed-desktop-mode[data-page="dashboard"] #tgDesktopEmbedGlassyPill .tg-desktop-embed-glassy-mark img {
    width: 34px;
    height: 34px;
  }

  body.tg-embed-desktop-mode[data-page="dashboard"] #tgDesktopEmbedGlassyPill strong {
    font-size: 1.02rem;
  }

  body.tg-embed-desktop-mode[data-page="dashboard"] #tgDesktopEmbedGlassyPill small {
    font-size: .72rem;
  }
}

body.tg-embed-desktop-mode[data-page="dashboard"] #ga-chat {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483646 !important;
}

body.tg-embed-desktop-mode[data-page="dashboard"] #ga-chat[data-open="1"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.tg-embed-desktop-mode[data-page="dashboard"] #ga-chat[aria-hidden="true"] {
  display: none !important;
}

body.tg-embed-desktop-mode[data-page="dashboard"] #ga-chat .ga-backdrop {
  pointer-events: auto;
}

body.tg-embed-desktop-mode[data-page="dashboard"] #ga-chat .ga-card {
  pointer-events: auto;
  z-index: 2147483647;
}

body.tg-embed-desktop-mode[data-page="dashboard"] #ga-chat[data-open="1"] #jdai {
  display: flex !important;
  width: 100%;
}

body.tg-embed-desktop-mode[data-page="dashboard"] .tg-desktop-embed-glassy-limit-cta {
  display: flex;
  justify-content: center;
  padding: 10px 0 2px;
}

body.tg-embed-desktop-mode[data-page="dashboard"] .tg-desktop-embed-glassy-limit-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8b5cf6, #c084fc);
  color: #fff;
  font-weight: 900;
  text-decoration: none;
  box-shadow: 0 12px 28px rgba(124, 58, 237, .35);
}

/* Desktop embed Glassy preview: allow the chat flyout to show when intentionally opened */
body.tg-embed-desktop-mode:not(.tg-phone-handset)[data-page="dashboard"] #ga-chat[data-open="1"] {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset)[data-page="dashboard"] #ga-chat[data-open="1"] .ga-card {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset)[data-page="dashboard"] #ga-chat[data-open="1"] .ga-body,
body.tg-embed-desktop-mode:not(.tg-phone-handset)[data-page="dashboard"] #ga-chat[data-open="1"] #gaChatBody {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset)[data-page="dashboard"] #ga-chat[data-open="1"] #jdai {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  margin: 0 !important;
  border: 0 !important;
  pointer-events: auto !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset)[data-page="dashboard"] #ga-chat[data-open="1"] #jdaiBody {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 260px;
  max-height: clamp(320px, 56vh, 620px);
  overflow-y: auto;
  overflow-x: hidden;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset)[data-page="dashboard"] #ga-chat[data-open="1"] .jdai-footer {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset)[data-page="dashboard"] #ga-chat[data-open="1"] #jdaiInput,
body.tg-embed-desktop-mode:not(.tg-phone-handset)[data-page="dashboard"] #ga-chat[data-open="1"] #jdaiSend {
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

/* Desktop embed Glassy modal: position inside chart panel bounds */
body.tg-embed-desktop-mode:not(.tg-phone-handset)[data-page="dashboard"] #ga-chat[data-open="1"] {
  position: fixed !important;
  inset: 0 !important;
  z-index: 2147483646 !important;
  display: block !important;
  padding: 0 !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset)[data-page="dashboard"] #ga-chat[data-open="1"] .ga-backdrop {
  position: fixed !important;
  inset: 0 !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset)[data-page="dashboard"] #ga-chat[data-open="1"] .ga-card {
  position: fixed !important;
  left: var(--tg-desktop-embed-chat-left, 50%) !important;
  top: var(--tg-desktop-embed-chat-top, 50%) !important;
  right: auto !important;
  bottom: auto !important;
  transform: none !important;
  width: var(--tg-desktop-embed-chat-width, min(720px, calc(100vw - 48px))) !important;
  max-width: calc(100vw - 36px) !important;
  max-height: var(--tg-desktop-embed-chat-max-height, calc(100dvh - 60px)) !important;
  margin: 0 !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset)[data-page="dashboard"] #ga-chat[data-open="1"] .ga-body,
body.tg-embed-desktop-mode:not(.tg-phone-handset)[data-page="dashboard"] #ga-chat[data-open="1"] #gaChatBody {
  min-height: 0 !important;
  max-height: calc(var(--tg-desktop-embed-chat-max-height, 560px) - 62px) !important;
  overflow: hidden !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset)[data-page="dashboard"] #ga-chat[data-open="1"] #jdai {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

body.tg-embed-desktop-mode:not(.tg-phone-handset)[data-page="dashboard"] #ga-chat[data-open="1"] #jdaiBody {
  min-height: 160px !important;
  max-height: calc(var(--tg-desktop-embed-chat-max-height, 560px) - 170px) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
