/* =====================================================================================
   Frozen Features Checklist (DO NOT CHANGE):
   - Flow logic/animation/timing/scroll behavior unchanged in normal mode.
   - Search/OPS/endpoints untouched.
   - PowerShare Studio only activates when ps=1.
   =====================================================================================
   PowerShare Studio (scoped)
   ===================================================================================== */
body.dt-ps {
  overflow: hidden;
  background: #0a0a10;
}

body.dt-ps.dt-ps-sheet-open {
  overflow: hidden;
}

body.dt-ps.dt-ps-resizing {
  overscroll-behavior: none;
  touch-action: none;
}

body.dt-ps.dt-ps-stage-only {
  background: #000;
}

body.dt-ps .dt-page {
  display: none;
}

.dt-ps .dt-ps-root {
  position: fixed;
  inset: 0;
  z-index: 2147483646;
  display: flex;
  flex-direction: column;
  color: #f5f5f7;
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(56, 106, 255, 0.15), transparent 55%),
    radial-gradient(circle at 80% 0%, rgba(255, 90, 125, 0.14), transparent 40%),
    #0b0b10;
  --dt-ps-divider-hit: 16px;
  --dt-ps-divider-line: 4px;
  --dt-ps-strip-h: 18px;
  --dt-ps-keyboard: 0px;
}

body.dt-ps.dt-ps-stage-only .dt-ps-root {
  background: #000;
}

.dt-ps .dt-ps-hud {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  padding: 0 14px calc(env(safe-area-inset-bottom) + 10px);
  display: flex;
  justify-content: center;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.dt-ps .dt-ps-hud.is-hidden {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
}

.dt-ps .dt-ps-hud-bar {
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(10, 10, 16, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  max-width: min(1080px, 96vw);
  width: 100%;
}

.dt-ps .dt-ps-hud-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.dt-ps .dt-ps-hud-row--primary {
  justify-content: flex-start;
}

.dt-ps .dt-ps-hud-row--secondary {
  justify-content: flex-start;
  flex-wrap: nowrap;
  overflow: visible;
}

.dt-ps .dt-ps-hud-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dt-ps .dt-ps-hud-cluster--left {
  position: relative;
}

.dt-ps .dt-ps-hud-cluster--center {
  justify-content: center;
}

.dt-ps .dt-ps-hud-cluster--secondary {
  justify-content: flex-start;
  flex-wrap: nowrap;
}

.dt-ps .dt-ps-hud-cluster--right {
  justify-content: flex-end;
}

.dt-ps .dt-ps-hud-hint {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  border: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 90, 125, 0.15), rgba(120, 160, 255, 0.35), rgba(255, 90, 125, 0.15));
  box-shadow: 0 0 12px rgba(120, 160, 255, 0.35);
  transition: opacity 0.25s ease;
  z-index: 25;
}

.dt-ps .dt-ps-hud-hint.is-visible {
  opacity: 1;
  pointer-events: auto;
}

.dt-ps .dt-ps-layout-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 240px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(12, 12, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 40;
}

.dt-ps .dt-ps-layout-sheet {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: var(--dt-ps-keyboard, 0px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 65;
}

.dt-ps .dt-ps-layout-sheet.is-open {
  opacity: 1;
  pointer-events: auto;
}

.dt-ps .dt-ps-layout-sheet__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 10, 0.6);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dt-ps .dt-ps-layout-sheet__panel {
  position: relative;
  width: min(560px, 100%);
  background: rgba(12, 12, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 18px 18px 0 0;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom) + var(--dt-ps-keyboard, 0px));
  box-shadow: 0 -20px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transform: translateY(100%);
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
  max-height: 70vh;
  min-height: 55vh;
  overflow: hidden;
}

.dt-ps .dt-ps-layout-sheet.is-open .dt-ps-layout-sheet__panel {
  transform: translateY(0);
}

.dt-ps .dt-ps-layout-sheet.is-dragging .dt-ps-layout-sheet__panel {
  transition: none;
}

.dt-ps .dt-ps-layout-sheet__handle {
  width: 46px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  margin: 2px auto 10px;
}

.dt-ps .dt-ps-layout-sheet__header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-bottom: 8px;
}

.dt-ps .dt-ps-layout-sheet__title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.75);
}

.dt-ps .dt-ps-layout-sheet__content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 2px;
}

.dt-ps .dt-ps-layout-sheet__section-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(245, 245, 247, 0.55);
  margin-bottom: 8px;
}

.dt-ps .dt-ps-layout-sheet__list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dt-ps .dt-ps-layout-sheet__hidden {
  padding-top: 4px;
}

.dt-ps .dt-ps-layout-sheet.is-minimal .dt-ps-layout-sheet__hidden {
  display: none;
}

.dt-ps .dt-ps-layout-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dt-ps .dt-ps-layout-menu__title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(245, 245, 247, 0.65);
  margin-bottom: 8px;
}

.dt-ps .dt-ps-layout-menu__title--muted {
  margin-top: 12px;
}

.dt-ps .dt-ps-layout-menu__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.dt-ps .dt-ps-layout-menu__list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dt-ps .dt-ps-layout-menu__empty {
  font-size: 12px;
  color: rgba(245, 245, 247, 0.55);
}

.dt-ps .dt-ps-btn {
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.08);
  color: inherit;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.dt-ps .dt-ps-btn:hover {
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.16);
}

.dt-ps .dt-ps-btn--ghost {
  background: transparent;
  border-color: rgba(255, 255, 255, 0.2);
}

.dt-ps .dt-ps-btn--icon {
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  font-size: 16px;
}

.dt-ps .dt-ps-btn--tiny {
  padding: 4px 8px;
  border-radius: 8px;
  font-size: 11px;
}

.dt-ps .dt-ps-btn--sheet {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.dt-ps .dt-ps-btn--sheet::before {
  font-size: 14px;
}

.dt-ps .dt-ps-btn[data-icon]::before {
  content: attr(data-icon);
  margin-right: 6px;
  font-size: 12px;
  line-height: 1;
}

.dt-ps .dt-ps-btn--icon-only {
  min-width: 28px;
  padding: 4px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dt-ps .dt-ps-btn--icon-only::before {
  margin-right: 0;
}

.dt-ps .dt-ps-btn--chip {
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.dt-ps .dt-ps-btn--tiny[data-icon]::before {
  font-size: 11px;
}

.dt-ps .dt-ps-btn--pill {
  border-radius: 999px;
  font-weight: 600;
}

.dt-ps .dt-ps-btn.is-active {
  border-color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.2);
}

.dt-ps .dt-ps-pane-chips {
  display: inline-flex;
  gap: 6px;
  padding: 2px 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  max-width: 100%;
  overflow: hidden;
  scrollbar-width: none;
}

.dt-ps .dt-ps-pane-chips::-webkit-scrollbar {
  display: none;
}

.dt-ps .dt-ps-btn.is-hidden {
  opacity: 0.55;
}

.dt-ps .dt-ps-stage-area {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: stretch;
  gap: 12px;
  padding: 0;
  overflow: hidden;
  flex: 1;
}

body.dt-ps.dt-ps-stage-only .dt-ps-stage-area {
  padding: 0;
}

.dt-ps .dt-ps-stage-wrap {
  width: 100%;
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dt-ps .dt-ps-stage {
  width: 100%;
  height: 100%;
  background: #000;
  border-radius: 0;
  border: 0;
  box-shadow: none;
  overflow: hidden;
  position: relative;
}

.dt-ps .dt-ps-strip-host {
  width: 100%;
  flex: 0 0 var(--dt-ps-strip-h, 84px);
  min-height: var(--dt-ps-strip-h, 84px);
}

.dt-ps .dt-ps-pane--strip {
  height: 100%;
  border-radius: 14px;
}

.dt-ps .dt-ps-pane--strip .dt-ps-pane-badge {
  top: 2px;
  left: 4px;
  padding: 1px 4px;
  font-size: 8px;
}

body.dt-ps.dt-ps-stage-only .dt-ps-stage {
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.dt-ps .dt-ps-pane-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  padding: 2px 6px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(245, 245, 247, 0.6);
  background: rgba(6, 6, 10, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.08);
  pointer-events: none;
  opacity: 0.6;
  display: none;
  z-index: 2;
}

.dt-ps .dt-ps-root.is-edit-mode .dt-ps-pane-badge {
  display: block;
}

.dt-ps .dt-ps-edit-pane-btn {
  display: none;
}

.dt-ps .dt-ps-edit-pane-btn.is-visible {
  display: inline-flex;
}

.dt-ps .dt-ps-overflow-wrap {
  position: relative;
  display: none;
}

.dt-ps .dt-ps-overflow-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 240px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(12, 12, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 40;
}

.dt-ps .dt-ps-overflow-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dt-ps .dt-ps-exit-fullscreen {
  position: fixed;
  top: calc(env(safe-area-inset-top) + 70px);
  right: 16px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(10, 10, 16, 0.72);
  color: rgba(245, 245, 247, 0.85);
  font-size: 11px;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  transform: translateY(-4px);
  z-index: 35;
}

.dt-ps .dt-ps-exit-fullscreen.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.dt-ps .dt-ps-split {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
}

.dt-ps .dt-ps-root.dt-ps-snap-animating .dt-ps-split {
  transition: grid-template-columns 0.16s ease, grid-template-rows 0.16s ease;
}

.dt-ps .dt-ps-split--primary.is-vertical {
  grid-template-columns: var(--dt-ps-primary, 50%) 1fr;
}

.dt-ps .dt-ps-split--primary.is-horizontal {
  grid-template-rows: var(--dt-ps-primary, 50%) 1fr;
}

.dt-ps .dt-ps-split--secondary.is-vertical {
  grid-template-columns: var(--dt-ps-secondary, 50%) 1fr;
}

.dt-ps .dt-ps-split--secondary.is-horizontal {
  grid-template-rows: var(--dt-ps-secondary, 50%) 1fr;
}

.dt-ps .dt-ps-split--tertiary.is-vertical {
  grid-template-columns: var(--dt-ps-tertiary, 50%) 1fr;
}

.dt-ps .dt-ps-split--tertiary.is-horizontal {
  grid-template-rows: var(--dt-ps-tertiary, 50%) 1fr;
}

.dt-ps .dt-ps-pane-host {
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.dt-ps .dt-ps-pane {
  position: relative;
  overflow: hidden;
  background: rgba(13, 13, 18, 0.7);
  border: 1px solid transparent;
  min-width: 0;
  min-height: 0;
}

.dt-ps .dt-ps-root.is-edit-mode .dt-ps-pane {
  border-color: rgba(255, 255, 255, 0.08);
}

.dt-ps .dt-ps-root.is-edit-mode .dt-ps-pane.is-active {
  border-color: rgba(120, 160, 255, 0.65);
  box-shadow: inset 0 0 0 1px rgba(120, 160, 255, 0.3);
}

.dt-ps .dt-ps-pane-content {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.dt-ps .dt-ps-divider {
  position: absolute;
  z-index: 5;
  background: transparent;
  border-radius: 999px;
  touch-action: none;
}

.dt-ps .dt-ps-divider::after {
  content: "";
  position: absolute;
  background: rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.dt-ps .dt-ps-divider:hover::after {
  background: rgba(255, 255, 255, 0.45);
}

.dt-ps .dt-ps-divider.is-snapping::after {
  background: rgba(120, 160, 255, 0.85);
  box-shadow: 0 0 12px rgba(120, 160, 255, 0.65);
}

.dt-ps .dt-ps-divider.is-snapped::after {
  animation: dt-ps-snap-pulse 0.16s ease;
}

@keyframes dt-ps-snap-pulse {
  0% {
    box-shadow: 0 0 0 rgba(120, 160, 255, 0.0);
  }
  100% {
    box-shadow: 0 0 14px rgba(120, 160, 255, 0.65);
  }
}

.dt-ps .dt-ps-split--primary.is-vertical .dt-ps-divider--primary {
  top: 0;
  bottom: 0;
  width: var(--dt-ps-divider-hit);
  left: calc(var(--dt-ps-primary, 50%) - (var(--dt-ps-divider-hit) / 2));
  cursor: col-resize;
}

.dt-ps .dt-ps-split--primary.is-horizontal .dt-ps-divider--primary {
  left: 0;
  right: 0;
  height: var(--dt-ps-divider-hit);
  top: calc(var(--dt-ps-primary, 50%) - (var(--dt-ps-divider-hit) / 2));
  cursor: row-resize;
}

.dt-ps .dt-ps-split--secondary.is-vertical .dt-ps-divider--secondary {
  top: 0;
  bottom: 0;
  width: var(--dt-ps-divider-hit);
  left: calc(var(--dt-ps-secondary, 50%) - (var(--dt-ps-divider-hit) / 2));
  cursor: col-resize;
}

.dt-ps .dt-ps-split--secondary.is-horizontal .dt-ps-divider--secondary {
  left: 0;
  right: 0;
  height: var(--dt-ps-divider-hit);
  top: calc(var(--dt-ps-secondary, 50%) - (var(--dt-ps-divider-hit) / 2));
  cursor: row-resize;
}

.dt-ps .dt-ps-split--tertiary.is-vertical .dt-ps-divider--tertiary {
  top: 0;
  bottom: 0;
  width: var(--dt-ps-divider-hit);
  left: calc(var(--dt-ps-tertiary, 50%) - (var(--dt-ps-divider-hit) / 2));
  cursor: col-resize;
}

.dt-ps .dt-ps-split--tertiary.is-horizontal .dt-ps-divider--tertiary {
  left: 0;
  right: 0;
  height: var(--dt-ps-divider-hit);
  top: calc(var(--dt-ps-tertiary, 50%) - (var(--dt-ps-divider-hit) / 2));
  cursor: row-resize;
}

.dt-ps .dt-ps-split--primary.is-vertical .dt-ps-divider--primary::after,
.dt-ps .dt-ps-split--secondary.is-vertical .dt-ps-divider--secondary::after,
.dt-ps .dt-ps-split--tertiary.is-vertical .dt-ps-divider--tertiary::after {
  top: 0;
  bottom: 0;
  width: var(--dt-ps-divider-line);
  left: 50%;
  transform: translateX(-50%);
}

.dt-ps .dt-ps-split--primary.is-horizontal .dt-ps-divider--primary::after,
.dt-ps .dt-ps-split--secondary.is-horizontal .dt-ps-divider--secondary::after,
.dt-ps .dt-ps-split--tertiary.is-horizontal .dt-ps-divider--tertiary::after {
  left: 0;
  right: 0;
  height: var(--dt-ps-divider-line);
  top: 50%;
  transform: translateY(-50%);
}

.dt-ps .dt-ps-pane-controls {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}

.dt-ps .dt-ps-select,
.dt-ps .dt-ps-input {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(6, 6, 10, 0.78);
  color: inherit;
  font-size: 12px;
}

.dt-ps .dt-ps-inspector {
  position: fixed;
  right: 16px;
  top: calc(env(safe-area-inset-top) + 76px);
  bottom: 16px;
  width: min(340px, 92vw);
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(12, 12, 18, 0.92);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(16px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 25;
}

.dt-ps .dt-ps-inspector.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.dt-ps .dt-ps-inspector-handle {
  width: 48px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.28);
  align-self: center;
  cursor: grab;
}

.dt-ps .dt-ps-inspector-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

.dt-ps .dt-ps-inspector-title {
  font-size: 13px;
  font-weight: 600;
}

.dt-ps .dt-ps-inspector-tabs {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dt-ps .dt-ps-inspector-tab {
  width: 34px;
  min-width: 34px;
  padding: 0;
  display: inline-flex;
  justify-content: center;
}

.dt-ps .dt-ps-inspector-tab.is-active {
  background: rgba(255,255,255,0.10);
  border-color: rgba(255,255,255,0.20);
}

.dt-ps .dt-ps-inspector-body {
  flex: 1;
  overflow: auto;
  padding-right: 4px;
}

.dt-ps .dt-ps-textarea {
  min-height: 110px;
  resize: vertical;
}


.dt-ps .dt-ps-smart-input{
  min-height: 90px;
}

.dt-ps .dt-ps-smart-apply{
  margin-top: 6px;
  align-self: flex-start;
}


.dt-ps .dt-ps-embed-mode {
  display: flex;
  gap: 6px;
}

.dt-ps .dt-ps-embed-mode-btn {
  flex: 1;
}

.dt-ps .dt-ps-embed-toggle {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: rgba(245, 245, 247, 0.75);
}

.dt-ps .dt-ps-embed-checkbox {
  accent-color: #89a0ff;
}

.dt-ps .dt-ps-embed-warning {
  font-size: 11px;
  color: #ffb2b2;
}

.dt-ps .dt-ps-helper {
  font-size: 11px;
  color: rgba(245, 245, 247, 0.6);
}

.dt-ps .dt-ps-helper.is-error {
  color: #ffb2b2;
}

.dt-ps .dt-ps-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: rgba(245, 245, 247, 0.6);
}

.dt-ps .dt-ps-placeholder--error {
  color: #ffb2b2;
}

.dt-ps .dt-ps-embed,
.dt-ps .dt-ps-image,
.dt-ps .dt-ps-video {
  width: 100%;
  height: 100%;
  border: 0;
}

.dt-ps .dt-ps-media-frame {
  position: absolute;
  inset: 0;
}

.dt-ps .dt-ps-media-embed {
  position: absolute;
  border: 0;
}

.dt-ps .dt-ps-embed-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dt-ps .dt-ps-media-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.dt-ps .dt-ps-embed-stage .dt-ps-media-embed {
  position: static;
}

.dt-ps .dt-ps-embed-stage iframe {
  border: 0;
}

.dt-ps .dt-ps-video-frame {
  position: absolute;
  width: 100%;
  height: 100%;
}

.dt-ps .dt-ps-video-embed {
  width: 100%;
  height: 100%;
  border: 0;
}

.dt-ps .dt-ps-video-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 20px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  background: linear-gradient(90deg, rgba(10, 10, 16, 0.35), rgba(10, 10, 16, 0.18));
  color: rgba(245, 245, 247, 0.7);
  font-size: 11px;
  line-height: 1;
  backdrop-filter: blur(6px);
  z-index: 2;
  pointer-events: none;
}

.dt-ps .dt-ps-video-overlay__line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.dt-ps .dt-ps-video-overlay__primary {
  letter-spacing: 0.02em;
}

.dt-ps .dt-ps-video-label {
  margin-top: 4px;
}

.dt-ps .dt-ps-embed-overlay {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 18px;
  text-align: center;
  background: rgba(9, 9, 13, 0.82);
  color: rgba(245, 245, 247, 0.85);
  z-index: 2;
}

.dt-ps .dt-ps-embed-overlay.is-visible {
  display: flex;
}

.dt-ps .dt-ps-embed-overlay__message {
  font-size: 13px;
  font-weight: 600;
}

.dt-ps .dt-ps-embed-overlay__subtext {
  font-size: 12px;
  color: rgba(245, 245, 247, 0.7);
}

.dt-ps .dt-ps-embed-overlay__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
}

.dt-ps .dt-ps-image {
  object-fit: contain;
  object-position: center;
}

.dt-ps .dt-ps-video {
  object-fit: contain;
  object-position: center;
}

body.dt-ps.dt-ps-scene-open .dt-ps-video,
body.dt-ps.dt-ps-scene-open .dt-ps-video-embed,
body.dt-ps.dt-ps-scene-open .dt-ps-video-frame {
  pointer-events: none;
}

@media (max-width: 720px) {
  .dt-ps .dt-ps-root {
    --dt-ps-divider-hit: 22px;
    background: #0b0b10;
    background-image: none;
  }

  .dt-ps .dt-ps-hud {
    padding: calc(env(safe-area-inset-top) + 2px) 6px 0;
  }

  .dt-ps .dt-ps-hud-bar {
    gap: 4px;
    padding: 6px;
    border-radius: 12px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .dt-ps .dt-ps-hud-row {
    gap: 6px;
  }

  .dt-ps .dt-ps-hud-row--primary .dt-ps-btn {
    font-size: 0;
    padding: 0 6px;
  }

  .dt-ps .dt-ps-hud-row--primary .dt-ps-btn[data-icon]::before {
    margin-right: 0;
    font-size: 15px;
  }

  .dt-ps .dt-ps-hud-row--primary .dt-ps-btn--icon-only {
    padding: 0;
  }

  .dt-ps .dt-ps-hud-cluster {
    gap: 6px;
  }

  .dt-ps .dt-ps-hide-hud-btn {
    display: none;
  }

  .dt-ps .dt-ps-layout-menu {
    display: none;
  }

  .dt-ps .dt-ps-overflow-wrap {
    display: inline-flex;
  }

  .dt-ps .dt-ps-btn--tiny {
    padding: 4px 8px;
    font-size: 11px;
    min-height: 32px;
  }

  .dt-ps .dt-ps-btn--icon-only {
    width: 32px;
    height: 32px;
    padding: 0;
  }

  .dt-ps .dt-ps-btn--chip {
    padding: 2px 7px;
    font-size: 10px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    background: transparent;
  }

  .dt-ps .dt-ps-btn--chip.is-active {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.08);
  }

  .dt-ps .dt-ps-pane-chips {
    padding: 2px;
    gap: 4px;
    border-radius: 8px;
    background: transparent;
    border-color: rgba(255, 255, 255, 0.12);
  }

  .dt-ps .dt-ps-exit-fullscreen {
    top: calc(env(safe-area-inset-top) + 50px);
    right: 10px;
  }

  .dt-ps .dt-ps-video-overlay {
    height: 22px;
    font-size: 10px;
    padding: 0 6px;
  }

  .dt-ps .dt-ps-inspector {
    left: 0;
    right: 0;
    top: auto;
    bottom: var(--dt-ps-keyboard, 0px);
    width: 100%;
    border-radius: 18px 18px 0 0;
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
    max-height: calc(100vh - var(--dt-ps-keyboard, 0px));
  }

  .dt-ps .dt-ps-inspector.is-open[data-state="collapsed"] {
    height: 22vh;
  }

  .dt-ps .dt-ps-inspector.is-open[data-state="half"] {
    height: 45vh;
  }

  .dt-ps .dt-ps-inspector.is-open[data-state="full"] {
    height: 80vh;
  }
}

@media (max-height: 520px) {
  .dt-ps .dt-ps-stage-area {
    padding-top: 0;
  }
}


/* ---- PowerShare canvas (desktop/mobile authoring) ---- */

.dt-ps .dt-ps-canvas{
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: stretch;
  width: 100%;
  height: 100%;
}
.dt-ps .dt-ps-canvas.is-constrained{
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: var(--dt-ps-canvas-aspect, 16/9);
  margin: 0 auto;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0,0,0,0.15);
  flex: 0 0 auto;
  display: block;

}
.dt-ps .dt-ps-canvas.is-constrained::before{
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.00));
}
.dt-ps .dt-ps-canvas.is-constrained > .dt-ps-stage{
  width: 100%;
  height: 100%;
}


/* === PS2 FIX: enforce true virtual canvas, not viewport-driven === */
.dt-ps-stage-wrap{
  display:flex !important;
  align-items:center;
  justify-content:center;
}

.dt-ps .dt-ps-canvas.is-constrained{
  max-width: 100%;
  max-height: 100%;
}

.dt-ps.ps-mode-desktop .dt-ps-canvas.is-constrained{
  --dt-ps-canvas-aspect: 16/9;
}

.dt-ps.ps-mode-mobile .dt-ps-canvas.is-constrained{
  --dt-ps-canvas-aspect: 9/16;
}



/* ===== DT PowerShare: Bottom HUD Pull-Tab + Pin (FFRM v3) ===== */
.dt-ps-hud{
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), opacity 180ms ease;
}
.dt-ps-hud.dt-ps-hud--docked{
  transform: translateY(calc(100% - 18px));
}
.dt-ps-hud.dt-ps-hud--open{
  transform: translateY(0);
}
.dt-ps-hud.dt-ps-hud--pinned{
  transform: translateY(0) !important;
}
.dt-ps-hud.dt-ps-hud--dragging{
  transition: none !important;
}

/* Pull tab: sits at top edge of docked HUD */
.dt-ps-hud-pulltab{
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  width: 72px;
  height: 18px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: grab;
  z-index: 2;
  pointer-events: auto;
}
.dt-ps-hud-pulltab__handle{
  display: block;
  width: 42px;
  height: 4px;
  margin: 7px auto;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,255,240,.85), rgba(180,120,255,.85));
  box-shadow: 0 0 10px rgba(0,255,240,.18);
  opacity: .95;
}

/* Pin button - minimal */
.dt-ps-hud-pin-btn{
  margin-left: 6px;
  line-height: 1;
}



/* ===== DT PowerShare: Bottom HUD Edge Bar + Pin (FFRM v4) ===== */
/* Default docked/open behavior (no auto-retract). */
.dt-ps-hud{
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), opacity 180ms ease;
  will-change: transform;
}
.dt-ps-hud.dt-ps-hud--docked{
  transform: translateY(calc(100% - 22px));
}
.dt-ps-hud.dt-ps-hud--open{
  transform: translateY(0);
}
.dt-ps-hud.dt-ps-hud--pinned{
  transform: translateY(0) !important;
}
.dt-ps-hud.dt-ps-hud--dragging{
  transition: none !important;
}

/* Full-width edge bar (main-page hide-bar style, but black). */
.dt-ps-hud-edge{
  position: absolute;
  top: -22px;
  left: 0;
  right: 0;
  height: 22px;
  padding: 0;
  border: 0;
  background: #000;
  cursor: row-resize;
  z-index: 5;
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid rgba(255,255,255,.08);
  border-bottom: 1px solid rgba(255,255,255,.10);
}
.dt-ps-hud-edge:active{ cursor: grabbing; }

/* Subtle grip mark in the center (low-contrast). */
.dt-ps-hud-edge__grip{
  width: 54px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.06));
  box-shadow: 0 0 0 1px rgba(0,0,0,.35) inset;
  opacity: .9;
}

/* Pin button stays minimal. */
.dt-ps-hud-pin-btn{
  margin-left: 6px;
  line-height: 1;
}



/* ===== DT PowerShare: Bottom HUD Protruding Tab + Pin (FFRM v5) ===== */
.dt-ps-hud{
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), opacity 180ms ease;
  will-change: transform;
}
.dt-ps-hud.dt-ps-hud--docked{ transform: translateY(calc(100% - 22px)); }
.dt-ps-hud.dt-ps-hud--open{ transform: translateY(0); }
.dt-ps-hud.dt-ps-hud--pinned{ transform: translateY(0) !important; }
.dt-ps-hud.dt-ps-hud--dragging{ transition: none !important; }

/* Hide the v4 edge bar if it exists anywhere */
.dt-ps-hud-edge{ display:none !important; }

/* Protruding tab (matches main-page "sticks out" language). */
.dt-ps-hud-tab{
  position:absolute;
  top:-22px;
  left:50%;
  transform:translateX(-50%);
  width:96px;
  height:22px;
  padding:0;
  border:0;
  background:#000;
  cursor:row-resize;
  z-index:6;
  pointer-events:auto;
  border-radius:14px 14px 0 0;
  box-shadow:
    0 -1px 0 rgba(255,255,255,.10),
    0  0 0 1px rgba(0,0,0,.65) inset,
    0  10px 24px rgba(0,0,0,.55);
  border-top:1px solid rgba(255,255,255,.08);
}
.dt-ps-hud-tab:active{ cursor:grabbing; }

.dt-ps-hud-tab__grip{
  display:block;
  width:46px;
  height:6px;
  margin:8px auto 0;
  border-radius:999px;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.06));
  opacity:.85;
}

/* Pin button stays minimal. */
.dt-ps-hud-pin-btn{ margin-left:6px; line-height:1; }



/* ===== DT PowerShare: Bottom HUD Main-Tab Match + Pin (FFRM v6) ===== */
.dt-ps-hud{
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), opacity 180ms ease;
  will-change: transform;
}
.dt-ps-hud.dt-ps-hud--docked{ transform: translateY(calc(100% - 28px)); }
.dt-ps-hud.dt-ps-hud--open{ transform: translateY(0); }
.dt-ps-hud.dt-ps-hud--pinned{ transform: translateY(0) !important; }
.dt-ps-hud.dt-ps-hud--dragging{ transition: none !important; }

/* Hide older edge bar / older tab styles if present */
.dt-ps-hud-edge{ display:none !important; }

/* Protruding pill tab (main-page style) */
.dt-ps-hud-tab{
  position:absolute;
  top:-28px;
  left:50%;
  transform:translateX(-50%);
  width:92px;
  height:28px;
  padding:0;
  border:0;
  background:transparent;
  z-index:6;
  pointer-events:auto;
  cursor:row-resize;
}
.dt-ps-hud-tab:active{ cursor:grabbing; }

.dt-ps-hud-tab__pill{
  width:92px;
  height:28px;
  border-radius:999px;
  display:flex;
  align-items:center;
  justify-content:center;
  /* match PS HUD palette: dark pill, subtle rim */
  background: rgba(0,0,0,.82);
  border: 1px solid rgba(255,255,255,.10);
  box-shadow:
    0 10px 24px rgba(0,0,0,.55),
    0 1px 0 rgba(255,255,255,.10) inset;
  backdrop-filter: blur(8px);
}

.dt-ps-hud-tab__chev{
  width:22px;
  height:22px;
  color: rgba(255,255,255,.88);
  transition: transform 180ms cubic-bezier(.2,.8,.2,1), opacity 180ms ease;
  opacity:.92;
}

/* When open, chevron points down like main page; when docked, it points up (invite pull). */
.dt-ps-hud-tab .dt-ps-hud-tab__chev{ transform: rotate(180deg); }
.dt-ps-hud-tab.is-open .dt-ps-hud-tab__chev{ transform: rotate(0deg); }

/* Pin button stays minimal. */
.dt-ps-hud-pin-btn{ margin-left:6px; line-height:1; }



/* ===== DT PowerShare: Tab visual match to main page (FFRM v7) ===== */
/* Make the tab feel like the main page protruding pill: compact, floaty, not clunky. */
.dt-ps .dt-ps-hud-tab{
  width: 78px !important;
  height: 26px !important;
  top: -26px !important;
  cursor: pointer;
}
.dt-ps .dt-ps-hud-tab__pill{
  width: 78px !important;
  height: 26px !important;
  border-radius: 999px !important;

  /* Match PS HUD bar palette but "lid" feeling */
  background: rgba(10, 10, 16, 0.88) !important;
  border: 1px solid rgba(255, 255, 255, 0.14) !important;

  box-shadow:
    0 10px 24px rgba(0,0,0,0.55),
    0 2px 0 rgba(255,255,255,0.10) inset,
    0 0 0 1px rgba(0,0,0,0.55) inset !important;

  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.dt-ps .dt-ps-hud-tab__chev{
  width: 20px !important;
  height: 20px !important;
  opacity: .95 !important;
  color: rgba(255,255,255,.92) !important;
}

/* Slight hover/focus lift (desktop) */
.dt-ps .dt-ps-hud-tab:focus-visible .dt-ps-hud-tab__pill,
.dt-ps .dt-ps-hud-tab:hover .dt-ps-hud-tab__pill{
  border-color: rgba(255,255,255,0.22) !important;
  box-shadow:
    0 12px 28px rgba(0,0,0,0.60),
    0 2px 0 rgba(255,255,255,0.12) inset,
    0 0 0 1px rgba(0,0,0,0.55) inset !important;
}



/* ===== DT PowerShare: Bottom HUD uses exact dt-chrome-restore tab (FFRM v8) ===== */
.dt-ps-hud{
  transition: transform 220ms cubic-bezier(.2,.8,.2,1), opacity 180ms ease;
  will-change: transform;
}
.dt-ps-hud.dt-ps-hud--docked{ transform: translateY(calc(100% - 18px)); }
.dt-ps-hud.dt-ps-hud--open{ transform: translateY(0); }
.dt-ps-hud.dt-ps-hud--pinned{ transform: translateY(0) !important; }
.dt-ps-hud.dt-ps-hud--dragging{ transition: none !important; }

/* Kill any prior custom PS tab implementations */
.dt-ps-hud-tab, .dt-ps-hud-edge, .dt-ps-hud-pulltab{ display:none !important; }

/* Reuse main tab class, but move it to bottom and match PS palette. */
.dt-ps .dt-chrome-restore.dt-ps-hud-restore{
  top: auto !important;
  bottom: 0 !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  z-index: 9001 !important;

  display: flex !important; /* main page hides it unless chrome hidden; we always show */
  width: 32px !important;
  height: 18px !important;

  /* Flip geometry for bottom */
  border-radius: 10px 10px 0 0 !important;
  border-bottom: none !important;
  border-top: 1px solid rgba(255,255,255,.12) !important;

  /* Match PS menu surface (dark glass) */
  background: rgba(10, 12, 14, 0.82) !important;
  color: rgba(255,255,255,.92) !important;
  border-left: 1px solid rgba(255,255,255,.10) !important;
  border-right: 1px solid rgba(255,255,255,.10) !important;

  box-shadow: 0 -6px 14px rgba(0,0,0,0.35) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* Use the same svg styling as main page, but rotate so docked shows an UP caret. */
.dt-ps .dt-chrome-restore.dt-ps-hud-restore svg{
  width: 14px !important;
  height: 14px !important;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Main page path points DOWN. At bottom, when docked we want UP => rotate 180deg.
   When open, point DOWN to indicate close. */
.dt-ps .dt-chrome-restore.dt-ps-hud-restore svg{ transform: rotate(180deg); }
.dt-ps .dt-chrome-restore.dt-ps-hud-restore.is-open svg{ transform: rotate(0deg); }

/* Pin button stays minimal */
.dt-ps-hud-pin-btn{ margin-left:6px; line-height:1; }



/* ===== DT PowerShare: FIX tab placement (FFRM v9) ===== */
/* The main-page restore tab *protrudes* from the chrome edge. For PS HUD it must protrude above the HUD when docked. */
/* Do NOT depend on .dt-ps being present; target via hud container. */
.dt-ps-hud .dt-chrome-restore.dt-ps-hud-restore{
  position: absolute !important;
  left: 50% !important;
  top: -18px !important;          /* protrude above HUD */
  bottom: auto !important;
  transform: translateX(-50%) !important;

  display: flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 32px !important;
  height: 18px !important;

  z-index: 99999 !important;

  /* Tab geometry */
  border-radius: 10px 10px 0 0 !important;
  border-bottom: 0 !important;

  /* PS palette (dark glass) but same physical tab language */
  background: rgba(10, 12, 14, 0.86) !important;
  color: rgba(255,255,255,.92) !important;
  border-top: 1px solid rgba(255,255,255,.14) !important;
  border-left: 1px solid rgba(255,255,255,.10) !important;
  border-right: 1px solid rgba(255,255,255,.10) !important;

  box-shadow:
    0 10px 22px rgba(0,0,0,.55),
    0 1px 0 rgba(255,255,255,.10) inset !important;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  pointer-events: auto !important;
}

.dt-ps-hud .dt-chrome-restore.dt-ps-hud-restore svg{
  width: 14px !important;
  height: 14px !important;
}

/* Docked = caret UP. Open = caret DOWN. */
.dt-ps-hud .dt-chrome-restore.dt-ps-hud-restore svg{ transform: rotate(180deg) !important; }
.dt-ps-hud.dt-ps-hud--open .dt-chrome-restore.dt-ps-hud-restore svg,
.dt-ps-hud .dt-chrome-restore.dt-ps-hud-restore.is-open svg{ transform: rotate(0deg) !important; }



/* ===== DT PowerShare: Keep tab visible + fix close tap (FFRM v10) ===== */
/* If any legacy code sets is-hidden, override it. Docked mode is the minimal state. */
.dt-ps .dt-ps-hud.is-hidden{
  opacity: 1 !important;
  transform: none !important;
}

/* Ensure the restore tab stays clickable even when the HUD container has pointer-events:none */
.dt-ps-hud .dt-chrome-restore.dt-ps-hud-restore{
  pointer-events: auto !important;
}

/* =====================================================================================
   OPS_CHANGE_P2_GRID_GUARD (2026-01-22)
   Goal: prevent "P2 becomes a thin strip" when split percentages accidentally sum > 100
   or when secondary/tertiary vars exist but shouldn't participate in grid sizing.

   Why this works:
   - We force the secondary track to be flexible (1fr) instead of another percent var.
   - We use minmax(0, ...) to avoid min-content collapse in grid children.
   - We harden min-height/min-width on grid containers and hosts for mobile + desktop.
   ===================================================================================== */

.dt-ps .dt-ps-split,
.dt-ps .dt-ps-pane-host {
  min-height: 0;
  min-width: 0;
}

/* Primary split: one explicit track + one flexible track (prevents percent+percent overflow). */
.dt-ps .dt-ps-split--primary.is-horizontal {
  grid-template-rows: minmax(0, var(--dt-ps-primary, 50%)) minmax(0, 1fr);
}
.dt-ps .dt-ps-split--primary.is-vertical {
  grid-template-columns: minmax(0, var(--dt-ps-primary, 50%)) minmax(0, 1fr);
}

/* Secondary split: same guard (if used in 3/4-pane layouts). */
.dt-ps .dt-ps-split--secondary.is-horizontal {
  grid-template-rows: minmax(0, var(--dt-ps-secondary, 50%)) minmax(0, 1fr);
}
.dt-ps .dt-ps-split--secondary.is-vertical {
  grid-template-columns: minmax(0, var(--dt-ps-secondary, 50%)) minmax(0, 1fr);
}

/* Tertiary split: same pattern */
.dt-ps .dt-ps-split--tertiary.is-horizontal {
  grid-template-rows: minmax(0, var(--dt-ps-tertiary, 50%)) minmax(0, 1fr);
}
.dt-ps .dt-ps-split--tertiary.is-vertical {
  grid-template-columns: minmax(0, var(--dt-ps-tertiary, 50%)) minmax(0, 1fr);
}