/* Both tools keep their existing iframe instances when changing layout. */
#jdUnionPanel > h3 { display: none; }
.union-panel-head { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.union-panel-title { color: #2b6de8; font-size: 14px; font-weight: 700; min-width: 0; }
.union-panel-actions { display: flex; gap: 4px; flex-shrink: 0; }
.union-panel-close, .union-resize-corner, .union-mobile-switch { display: none; }
#ytShowUnion { display: none; }
#jdUnionPanel .union-resize-corner { display: none; }
body.union-float-open #viewJdUnion { display: block !important; }
body.union-float-open #jdUnionPanel {
  position: fixed; z-index: 71; display: flex; flex-direction: column;
  min-width: 320px; min-height: 360px; padding: 0; margin: 0;
  background: #fff; border: 1px solid #dfe4ed; border-radius: 8px;
  box-shadow: 0 14px 40px rgba(20, 28, 48, .24); overflow: hidden;
}
body.union-float-open .union-panel-head {
  flex: 0 0 auto; justify-content: space-between; gap: 8px; min-height: 48px; margin: 0; padding: 7px 10px;
  border-bottom: 1px solid #e7eaf0; cursor: move; user-select: none; touch-action: none;
}
body.union-float-open #jdUnionPanel > .hint { display: none; }
body.union-float-open #jdUnionFrame { flex: 1 1 0; width: 100%; height: 100% !important; min-height: 0; }
body.union-float-open .union-panel-close { display: inline-flex; }
body.union-float-open #jdUnionPanel .union-resize-corner { display: block; }
body.union-float-open .union-resize-corner:focus-visible { outline: 2px solid #2b6de8; }
@media (max-width: 700px) {
  body.union-float-open { overflow: hidden; }
  body.union-float-open #jdUnionPanel {
    inset: 0 !important; width: 100% !important; height: 100% !important;
    height: 100dvh !important; min-width: 0; min-height: 0; border: 0; border-radius: 0;
  }
  body.union-float-open .union-panel-head { cursor: default; }
  body.union-float-open .union-resize-corner { display: none !important; }
  body.union-float-open.dock-open .union-mobile-switch { display: inline-flex; }
  body.union-float-open.dock-open #ytShowUnion { display: inline-flex; }
}
